Posts
53
Respect
Forum Rank
Rotting Walker
Primary Group
Member
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!if( user[i] player_is_in_laststand() && user[i].haspart == true )#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_hud_util;
precache_test_script()
{
PrecacheItem( "zombie_knuckle_crack" );
precacheshader( "staff_part_hud");
}
main()
{
flag_init("staff_part_build");
staff_part_pickup = GetEnt("staff_part_pickup","targetname"); // Pickup trigger
staff_part_pickup thread staff_part_pickup();
staff_part_build = GetEnt("staff_part_build","targetname"); // Build trigger
staff_part_build thread staff_part_build();
}
staff_part_pickup()
{
while(1)
{
self.haspart = undefined;
self sethintstring( "Press &&1 to pick up staff part" );
self setCursorHint( "HINT_NOICON" );
self UseTriggerRequireLookat();
player = undefined;
staff_part_model = getent("staff_part_model", "targetname"); // Pickup model
self waittill("trigger", player);
staff_part_model hide();
player thread staff_hud_create();
self.haspart = true;
playfx (level._effect["fx_fire_barrel_med"], self.origin);
self disable_trigger();
}
}
staff_part_build()
{
self setCursorHint( "HINT_NOICON" );
self UseTriggerRequireLookat();
staff_part_model = getent("staff_part_build", "targetname"); // Build Model
staff_part_model hide();
user = undefined;
self sethintstring( "Press and hold &&1 to build staff part" );
while(1) //////////////// Don Gooney's Hacker Function ////////////////
{
self waittill( "trigger" , user );
if(user.haspart == true)
{
thread staff_part_drop();
self playsound( "soul_fly" );
timer = 0;
if(level.timedout)
{
hack_time = 2;
}
else
{
hack_time = 2;
}
Texthud = newClientHudElem(user);
Texthud.alignX = "center";
Texthud.alignY = "middle";
Texthud.horzAlign = "center";
Texthud.vertAlign = "bottom";
Texthud.y = -148;
Texthud.foreground = true;
Texthud.font = "default";
Texthud.fontScale = 1.8;
Texthud.alpha = 1;
Texthud.color = ( 1.0, 1.0, 1.0 );
Texthud setText( "BUILDING PART" );
ProgressBar = user createPrimaryProgressBar();
ProgressBar updateBar( 0.02, 2 / hack_time );
ProgressBar.color = ( .5, 1, 1 );
while(user useButtonPressed())
{
wait 0.05;
timer += 0.05;
user thread do_knuckle_crack();
if ( player maps\_laststand::player_is_in_laststand())
{
break;
}
if( timer >= hack_time)
{
ProgressBar = user destroyElem();
Texthud = user destroy();
playfx (level._effect["fx_fire_barrel_med"], staff_part_model.origin);
staff_part_model = Spawn( "script_model" , self.origin -(0,0,0) );
staff_part_model SetModel( "static_seelow_shovel" );
self playsound( "soul_fly" );
self disable_trigger();
self sethintstring( "need other part to add" );
{
break;
}
}
}
}
ProgressBar = user destroyElem();
Texthud = user destroy();
}
}
staff_part_drop()
{
user = getplayers();
for( i = 0; i < user[i].size; i++ )
{
if( user[i] player_is_in_laststand() && user[i].haspart == true )
{
user = getent("staff_part_model", "targetname"); // Pickup model
staff_part_model = Spawn( "script_model" , self.origin -(0,0,20) );
staff_part_model SetModel( "static_seelow_shovel" );
user = GetEnt("staff_part_pickup","targetname"); // Pickup trigger
staff_part_pickup enable_trigger();
user[i].haspart = false ;
}
wait 0.05;
}
}
staff_hud_create()
{
hud = create_simple_hud( self );
hud.foreground = true;
hud.sort = 1;
hud.hidewheninmenu = false;
hud.alignX = "right";
hud.alignY = "bottom";
hud.horzAlign = "right";
hud.vertAlign = "bottom";
hud.x = hud.x + 2;
hud.y = hud.y - 75;
hud.alpha = 1;
hud SetShader( "staff_part_hud" , 75, 40 );
}
do_knuckle_crack()
{
self DisableOffhandWeapons();
self DisableWeaponCycling();
self AllowLean( false );
self AllowAds( false );
self AllowSprint( false );
self AllowProne( false );
self AllowMelee( false );
if ( self GetStance() == "prone" )
{
self SetStance( "crouch" );
}
gun = self GetCurrentWeapon();
weapon = "zombie_knuckle_crack";
self GiveWeapon( weapon );
self SwitchToWeapon( weapon );
self waittill_any( "fake_death", "death", "player_downed", "weapon_change_complete" );
self EnableOffhandWeapons();
self EnableWeaponCycling();
self GiveWeapon( gun );
self SwitchToWeapon( gun );
self AllowLean( true );
self AllowAds( true );
self AllowSprint( true );
self AllowProne( true );
self AllowMelee( true );
return gun;
}



![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() Oil Rig Beta Access |
last_stand = user[i] maps\_laststand::player_is_in_laststand();
if( last_stand && user[i].haspart == true )staff_part_drop()
{
user = getplayers();
for( i = 0; i < user[i].size; i++ )
{
last_stand = user[i] maps\_laststand::player_is_in_laststand(); // and here is bluntstuffys fix the reason for this is because you don't have last stand included like this #include maps/_laststandblah blah blah (which you don't need) or did a cross file call which he did so it couldn't find the file cause it as only searching this file and the ones that were #included but now it should work :D
if( last_stand && user[i].haspart == true )
{
staff_model = getent("staff_part_model", "targetname"); // Pickup model
staff_model moveto (user[i].origin, 0.5); // i replaced what you had here because it really didn't make sense, i made it move the model and show it again witch will show whatever model has the target name above
staff_model show()
staff_trig = GetEnt("staff_part_pickup","targetname"); // Pickup trigger
staff_trig moveto (user[i].origin, 0.5); // here i made it so that it takes the same trigger but moves it to the player and enables it the way you had it would cause the trigger to stay in its original position
staff_trig enable_trigger();
user[i].haspart = false ;
}
wait 0.05;
}
} staff_trig = GetEnt("staff_part_pickup","targetname"); // Pickup triggerstaff_part_drop()
{
user = getplayers();
for( i = 0; i < user[i].size; i++ )
{
last_stand = user[i] maps\_laststand::player_is_in_laststand();
if( last_stand && user[i].haspart == true )
{
staff_model = getent("staff_part_model", "targetname"); // Pickup model
staff_model moveto (user[i].origin, 0.5);
staff_model show(); // forgot the ; here
staff_trig = GetEnt("staff_part_pickup","targetname"); // Pickup trigger
staff_trig moveto (user[i].origin, 0.5);
staff_trig enable_trigger();
user[i].haspart = false ;
}
wait 0.05;
}
} #include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_hud_util;
precache_test_script()
{
PrecacheItem( "zombie_knuckle_crack" );
precachemodel( "static_seelow_shovel" );
precacheshader( "staff_part_hud");
}
main()
{
flag_init("staff_part_build");
staff_part_model = GetEnt("staff_part_pickup","targetname"); // Pickup trigger
staff_part_model thread staff_part_pickup();
staff_part_build = GetEnt("staff_part_build","targetname"); // Build trigger
staff_part_build thread staff_part_build();
}
staff_part_pickup()
{
while(1)
{
self.haspart = undefined;
self sethintstring( "Press &&1 to pick up staff part" );
self setCursorHint( "HINT_NOICON" );
self UseTriggerRequireLookat();
player = undefined;
staff_part_model = getent("staff_part_model", "targetname"); // Pickup model
self waittill("trigger", player);
player thread staff_hud_create();
flag_set( "staff_part_build" );
self.haspart = true;
self thread staff_part_drop();
playfx (level._effect["fx_fire_barrel_med"], self.origin);
self disable_trigger();
}
}
staff_part_build()
{
self setCursorHint( "HINT_NOICON" );
self UseTriggerRequireLookat();
staff_part_model = getent("staff_part_build", "targetname"); // Build Model
staff_part_model hide();
player = undefined;
flag_wait( "staff_part_build" );
self sethintstring( "Press and hold &&1 to build staff part" );
while(1) //////////////// Don Gooney's Hacker Function ////////////////
{
self waittill( "trigger" , player );
// if(user[i].haspart == true )
{
self playsound( "soul_fly" );
timer = 0;
if(level.timedout)
{
hack_time = 2;
}
else
{
hack_time = 2;
}
Texthud = newClientHudElem(player);
Texthud.alignX = "center";
Texthud.alignY = "middle";
Texthud.horzAlign = "center";
Texthud.vertAlign = "bottom";
Texthud.y = -148;
Texthud.foreground = true;
Texthud.font = "default";
Texthud.fontScale = 1.8;
Texthud.alpha = 1;
Texthud.color = ( 1.0, 1.0, 1.0 );
Texthud setText( "BUILDING PART" );
ProgressBar = player createPrimaryProgressBar(); //////////////// Don Gooney's Hacker Function ////////////////
ProgressBar updateBar( 0.01, 1 / hack_time );
ProgressBar.color = ( .5, 1, 1 );
while(player useButtonPressed())
{
wait 0.05;
timer += 0.05;
player thread do_knuckle_crack();
if ( player maps\_laststand::player_is_in_laststand())
{
break;
}
if( timer >= hack_time)
{
ProgressBar destroyElem();
Texthud destroy();
playfx (level._effect["fx_fire_barrel_med"], staff_part_model.origin);
staff_part_model = Spawn( "script_model" , self.origin -(0,0,0) );
staff_part_model SetModel( "static_seelow_shovel" );
self playsound( "soul_fly" );
self disable_trigger();
self sethintstring( "need other part to add" );
{
break;
}
}
}
}
ProgressBar destroyElem();
Texthud destroy();
}
}
staff_part_drop()
{
user = getplayers();
for( i = 0; i < user[i].size; i++ )
{
last_stand = user[i] maps\_laststand::player_is_in_laststand();
if( last_stand && user[i].haspart == true )
{
staff_model = getent("staff_part_model", "targetname"); // Pickup model
staff_model moveto (user[i].origin, 0.5);
staff_model show(); // forgot the ; here
user[i].haspart = false ;
staff_trig = GetEnt("staff_part_pickup","targetname"); // Pickup trigger
staff_trig moveto (user[i].origin, 0.5);
staff_trig enable_trigger();
{
break;
}
}
wait 0.05;
}
}
staff_hud_create()
{
hud = create_simple_hud( self );
hud.foreground = true;
hud.sort = 1;
hud.hidewheninmenu = false;
hud.alignX = "right";
hud.alignY = "bottom";
hud.horzAlign = "right";
hud.vertAlign = "bottom";
hud.x = hud.x + 2;
hud.y = hud.y - 75;
hud.alpha = 1;
hud SetShader( "staff_part_hud" , 75, 40 );
}
do_knuckle_crack()
{
self DisableOffhandWeapons();
self DisableWeaponCycling();
self AllowLean( false );
self AllowAds( false );
self AllowSprint( false );
self AllowProne( false );
self AllowMelee( false );
if ( self GetStance() == "prone" )
{
self SetStance( "crouch" );
}
gun = self GetCurrentWeapon();
weapon = "zombie_knuckle_crack";
self GiveWeapon( weapon );
self SwitchToWeapon( weapon );
self waittill_any( "fake_death", "death", "player_downed", "weapon_change_complete" );
self EnableOffhandWeapons();
self EnableWeaponCycling();
self GiveWeapon( gun );
self SwitchToWeapon( gun );
self AllowLean( true );
self AllowAds( true );
self AllowSprint( true );
self AllowProne( true );
self AllowMelee( true );
return gun;
}
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_hud_util;
precache_test_script()
{
PrecacheItem( "zombie_knuckle_crack" );
precachemodel( "static_seelow_shovel" );
precacheshader( "staff_part_hud");
}
main()
{
flag_init("staff_part_build");
level thread staff_part_pickup();
level thread staff_part_build();
level thread staff_part_drop();
}
staff_part_pickup()
{
while(1)
{
staff_part_trig = GetEnt("staff_part_pickup","targetname");
haspart = undefined;
staff_part_trig sethintstring( "Press &&1 to pick up staff part" );
staff_part_trig setCursorHint( "HINT_NOICON" );
staff_part_trig UseTriggerRequireLookat();
player = undefined;
staff_part_model = getent("staff_part_model", "targetname"); // Pickup model
staff_part_trig waittill("trigger", player);
player thread staff_hud_create();
flag_set( "staff_part_build" );
player.haspart = true;
playfx (level._effect["fx_fire_barrel_med"], self.origin);
self disable_trigger();
}
}
staff_part_build()
{
build_trig = GetEnt("staff_part_build","targetname"); // Build trigger
build_trig setCursorHint( "HINT_NOICON" );
build_trig UseTriggerRequireLookat();
staff_part_model = getent("staff_part_build", "targetname"); // Build Model
staff_part_model hide();
player = undefined;
flag_wait( "staff_part_build" );
build_trig sethintstring( "Press and hold &&1 to build staff part" );
while(1) //////////////// Don Gooney's Hacker Function ////////////////
{
build_trig waittill( "trigger" , player );
// if(user[i].haspart == true )
{
build_trig playsound( "soul_fly" );
timer = 0;
if(level.timedout)
{
hack_time = 2;
}
else
{
hack_time = 2;
}
Texthud = newClientHudElem(player);
Texthud.alignX = "center";
Texthud.alignY = "middle";
Texthud.horzAlign = "center";
Texthud.vertAlign = "bottom";
Texthud.y = -148;
Texthud.foreground = true;
Texthud.font = "default";
Texthud.fontScale = 1.8;
Texthud.alpha = 1;
Texthud.color = ( 1.0, 1.0, 1.0 );
Texthud setText( "BUILDING PART" );
ProgressBar = player createPrimaryProgressBar(); //////////////// Don Gooney's Hacker Function ////////////////
ProgressBar updateBar( 0.01, 1 / hack_time );
ProgressBar.color = ( .5, 1, 1 );
while(player useButtonPressed())
{
wait 0.05;
timer += 0.05;
player thread do_knuckle_crack();
if ( player maps\_laststand::player_is_in_laststand())
{
break;
}
if( timer >= hack_time)
{
ProgressBar destroyElem();
Texthud destroy();
playfx (level._effect["fx_fire_barrel_med"], staff_part_model.origin);
staff_part_model show();
build_trig playsound( "soul_fly" );
build_trig disable_trigger();
{
break;
}
}
}
}
ProgressBar destroyElem();
Texthud destroy();
}
}
staff_part_drop()
{
while(1)
{
user = getplayers();
for( i = 0; i < user[i].size; i++ )
{
user[i] waittill_any( "fake_death", "death", "player_downed")
{
staff_model = getent("staff_part_model", "targetname"); // Pickup model
staff_model moveto (user[i].origin, 0.5);
staff_model show(); // forgot the ; here
user[i].haspart = false ;
staff_trig = GetEnt("staff_part_pickup","targetname"); // Pickup trigger
staff_trig moveto (user[i].origin, 0.5);
staff_trig enable_trigger();
{
break;
}
}
wait 0.05;
}
}
}
staff_hud_create()
{
hud = create_simple_hud( self );
hud.foreground = true;
hud.sort = 1;
hud.hidewheninmenu = false;
hud.alignX = "right";
hud.alignY = "bottom";
hud.horzAlign = "right";
hud.vertAlign = "bottom";
hud.x = hud.x + 2;
hud.y = hud.y - 75;
hud.alpha = 1;
hud SetShader( "staff_part_hud" , 75, 40 );
}
do_knuckle_crack()
{
self DisableOffhandWeapons();
self DisableWeaponCycling();
self AllowLean( false );
self AllowAds( false );
self AllowSprint( false );
self AllowProne( false );
self AllowMelee( false );
if ( self GetStance() == "prone" )
{
self SetStance( "crouch" );
}
gun = self GetCurrentWeapon();
weapon = "zombie_knuckle_crack";
self GiveWeapon( weapon );
self SwitchToWeapon( weapon );
self waittill_any( "fake_death", "death", "player_downed", "weapon_change_complete" );
self EnableOffhandWeapons();
self EnableWeaponCycling();
self GiveWeapon( gun );
self SwitchToWeapon( gun );
self AllowLean( true );
self AllowAds( true );
self AllowSprint( true );
self AllowProne( true );
self AllowMelee( true );
return gun;
}
user[i] waittill_any( "fake_death", "death", "player_downed")#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_hud_util;
precache_test_script()
{
PrecacheItem( "zombie_knuckle_crack" );
precachemodel( "static_seelow_shovel" );
precacheshader( "staff_part_hud");
}
main()
{
flag_init("staff_part_build");
level thread staff_part_pickup();
level thread staff_part_build();
level thread staff_part_drop();
}
staff_part_pickup()
{
while(1)
{
staff_part_trig = GetEnt("staff_part_pickup","targetname");
haspart = undefined;
staff_part_trig sethintstring( "Press &&1 to pick up staff part" );
staff_part_trig setCursorHint( "HINT_NOICON" );
staff_part_trig UseTriggerRequireLookat();
player = undefined;
staff_part_model = getent("staff_part_model", "targetname"); // Pickup model
staff_part_trig waittill("trigger", player);
player thread staff_hud_create();
flag_set( "staff_part_build" );
player.haspart = true;
playfx (level._effect["fx_fire_barrel_med"], self.origin);
self disable_trigger();
}
}
staff_part_build()
{
build_trig = GetEnt("staff_part_build","targetname"); // Build trigger
build_trig setCursorHint( "HINT_NOICON" );
build_trig UseTriggerRequireLookat();
staff_part_model = getent("staff_part_build", "targetname"); // Build Model
staff_part_model hide();
player = undefined;
flag_wait( "staff_part_build" );
build_trig sethintstring( "Press and hold &&1 to build staff part" );
while(1) //////////////// Don Gooney's Hacker Function ////////////////
{
build_trig waittill( "trigger" , player );
// if(user[i].haspart == true )
{
build_trig playsound( "soul_fly" );
timer = 0;
if(level.timedout)
{
hack_time = 2;
}
else
{
hack_time = 2;
}
Texthud = newClientHudElem(player);
Texthud.alignX = "center";
Texthud.alignY = "middle";
Texthud.horzAlign = "center";
Texthud.vertAlign = "bottom";
Texthud.y = -148;
Texthud.foreground = true;
Texthud.font = "default";
Texthud.fontScale = 1.8;
Texthud.alpha = 1;
Texthud.color = ( 1.0, 1.0, 1.0 );
Texthud setText( "BUILDING PART" );
ProgressBar = player createPrimaryProgressBar(); //////////////// Don Gooney's Hacker Function ////////////////
ProgressBar updateBar( 0.01, 1 / hack_time );
ProgressBar.color = ( .5, 1, 1 );
while(player useButtonPressed())
{
wait 0.05;
timer += 0.05;
player thread do_knuckle_crack();
if ( player maps\_laststand::player_is_in_laststand())
{
break;
}
if( timer >= hack_time)
{
ProgressBar destroyElem();
Texthud destroy();
playfx (level._effect["fx_fire_barrel_med"], staff_part_model.origin);
staff_part_model show();
build_trig playsound( "soul_fly" );
build_trig disable_trigger();
{
break;
}
}
}
}
ProgressBar destroyElem();
Texthud destroy();
}
}
staff_part_drop()
{
while(1)
{
user = getplayers();
for( i = 0; i < user[i].size; i++ )
{
user[i] waittill_any( "fake_death", "death", "player_downed");
{
staff_model = getent("staff_part_model", "targetname"); // Pickup model
staff_model moveto (user[i].origin, 0.5);
staff_model show(); // forgot the ; here
user[i].haspart = false ;
staff_trig = GetEnt("staff_part_pickup","targetname"); // Pickup trigger
staff_trig moveto (user[i].origin, 0.5);
staff_trig enable_trigger();
{
break;
}
}
wait 0.05;
}
}
}
staff_hud_create()
{
hud = create_simple_hud( self );
hud.foreground = true;
hud.sort = 1;
hud.hidewheninmenu = false;
hud.alignX = "right";
hud.alignY = "bottom";
hud.horzAlign = "right";
hud.vertAlign = "bottom";
hud.x = hud.x + 2;
hud.y = hud.y - 75;
hud.alpha = 1;
hud SetShader( "staff_part_hud" , 75, 40 );
}
do_knuckle_crack()
{
self DisableOffhandWeapons();
self DisableWeaponCycling();
self AllowLean( false );
self AllowAds( false );
self AllowSprint( false );
self AllowProne( false );
self AllowMelee( false );
if ( self GetStance() == "prone" )
{
self SetStance( "crouch" );
}
gun = self GetCurrentWeapon();
weapon = "zombie_knuckle_crack";
self GiveWeapon( weapon );
self SwitchToWeapon( weapon );
self waittill_any( "fake_death", "death", "player_downed", "weapon_change_complete" );
self EnableOffhandWeapons();
self EnableWeaponCycling();
self GiveWeapon( gun );
self SwitchToWeapon( gun );
self AllowLean( true );
self AllowAds( true );
self AllowSprint( true );
self AllowProne( true );
self AllowMelee( true );
return gun;
}