UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

buildable script help

HOT
broken avatar :(
Created 10 years ago
by lordkurt6
0 Members and 1 Guest are viewing this topic.
4,611 views
broken avatar :(
×
broken avatar :(
Location: usUsa
Date Registered: 21 July 2013
Last active: 2 months ago
Posts
53
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
lordkurt6's Groups
lordkurt6's Contact & Social LinkstehfeedzPryZeWaRVii
I need help I got an error. look in staff_part_drop() and ur find,
Code Snippet
Plaintext
if( user[i] player_is_in_laststand() && user[i].haspart == true )
that is the error. I wanted it so when player goes down in laststand part drops respawn back were it came from. im just learning this is my 1st buildable script trying make it like bo2 atm just testing so staff part a shovel for now   I tried my best make guys understand bad at spelling (:



Code Snippet
Plaintext
#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;
}
broken avatar :(
×
broken avatar :(
Senpai
Location: us
Date Registered: 28 September 2013
Last active: 3 years ago
Posts
605
Respect
Forum Rank
Zombie Enslaver
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
arceus's Groups
Box Mappers Elite
Box Mappers Elite
arceus's Contact & Social LinksarceusNT
can you say the specific error just saying there is a error isn't enough

Double Post Merge: October 24, 2014, 11:12:34 am
also when the player would drop it the model appears at the body but the you'd have to go to the same space to actually pick it up. do you want it to spawn at the player?
Last Edit: October 24, 2014, 11:12:34 am by arceus
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
srry i didn't reply to your pm yet. This is just Don Goony's buildable's and hacker funstion in one script.
the parts are not player-specific, so it's really not like bo2..



EDIT: My bad, i see you've changed some stuff since the last PM you sent, so it looks like it's player-specific now. I didn't really look through the script, this line should just fix your syntax / unknown function error

You prob need to change the line into:
Code Snippet
Plaintext
last_stand = user[i] maps\_laststand::player_is_in_laststand();
if( last_stand && user[i].haspart == true )
Last Edit: October 24, 2014, 12:21:20 pm by BluntStuffy
broken avatar :(
×
broken avatar :(
Senpai
Location: us
Date Registered: 28 September 2013
Last active: 3 years ago
Posts
605
Respect
Forum Rank
Zombie Enslaver
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
arceus's Groups
Box Mappers Elite
Box Mappers Elite
arceus's Contact & Social LinksarceusNT
illl go through the script and make adjustments for you there are a few things that don't quiet work the way you want it to
broken avatar :(
×
broken avatar :(
Location: usUsa
Date Registered: 21 July 2013
Last active: 2 months ago
Posts
53
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
lordkurt6's Groups
lordkurt6's Contact & Social LinkstehfeedzPryZeWaRVii
ok thanks guys for the help it just im starting learn more and more so yeah I really want make this buildable like bo2 so far I got buildable hud text and kuncky crack when building items and sound soon u hit f it will play sound but got lot work to do as script so way near done just getting starting that all
broken avatar :(
×
broken avatar :(
Senpai
Location: us
Date Registered: 28 September 2013
Last active: 3 years ago
Posts
605
Respect
Forum Rank
Zombie Enslaver
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
arceus's Groups
Box Mappers Elite
Box Mappers Elite
arceus's Contact & Social LinksarceusNT
ok so i went through and adjusted the function

Code Snippet
Plaintext
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;
}
broken avatar :(
×
broken avatar :(
Location: usUsa
Date Registered: 21 July 2013
Last active: 2 months ago
Posts
53
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
lordkurt6's Groups
lordkurt6's Contact & Social LinkstehfeedzPryZeWaRVii
there an error bad syntax on line 126
Code Snippet
Plaintext
staff_trig = GetEnt("staff_part_pickup","targetname"); // Pickup trigger
I trieing to fix it just letting u know if u fix it befor me (:
broken avatar :(
×
broken avatar :(
Senpai
Location: us
Date Registered: 28 September 2013
Last active: 3 years ago
Posts
605
Respect
Forum Rank
Zombie Enslaver
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
arceus's Groups
Box Mappers Elite
Box Mappers Elite
arceus's Contact & Social LinksarceusNT
oh i forgot to put a ; on the show function put it there and its fixed
Code Snippet
Plaintext
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

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;
}

a syntax error normally is caused by the line above of the line that it says is the error
Last Edit: October 24, 2014, 03:51:34 pm by arceus
broken avatar :(
×
broken avatar :(
Location: usUsa
Date Registered: 21 July 2013
Last active: 2 months ago
Posts
53
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
lordkurt6's Groups
lordkurt6's Contact & Social LinkstehfeedzPryZeWaRVii
right  i got it to work but few bugs right when I pickup part without building I can get other part but I want it so soon u pickup 1st part trigger disable and then soon u go down when hit by zombie trigger enable and player no longer has part and has to go pick it bk up were it came from 1st trigger

///////////////////////////////////////////////////////////////////////////////////////////////


and I can pickup part after part after part on the same tigger I want so when player take part tigger disable intill he goes down when hit by zombie then tigger reable so can pick up part the one u loes when u went down



Code Snippet
Plaintext
#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;
}
Last Edit: October 24, 2014, 07:33:06 pm by lordkurt6
broken avatar :(
×
broken avatar :(
Senpai
Location: us
Date Registered: 28 September 2013
Last active: 3 years ago
Posts
605
Respect
Forum Rank
Zombie Enslaver
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
arceus's Groups
Box Mappers Elite
Box Mappers Elite
arceus's Contact & Social LinksarceusNT
ok i see what you did wrong let me fix it

Double Post Merge: October 24, 2014, 08:07:13 pm
ok this should work
Code Snippet
Plaintext
#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;
}
Last Edit: October 24, 2014, 08:07:13 pm by arceus
broken avatar :(
×
broken avatar :(
Location: usUsa
Date Registered: 21 July 2013
Last active: 2 months ago
Posts
53
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
lordkurt6's Groups
lordkurt6's Contact & Social LinkstehfeedzPryZeWaRVii
your the best nice quick reply I try it now
broken avatar :(
×
broken avatar :(
Senpai
Location: us
Date Registered: 28 September 2013
Last active: 3 years ago
Posts
605
Respect
Forum Rank
Zombie Enslaver
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
arceus's Groups
Box Mappers Elite
Box Mappers Elite
arceus's Contact & Social LinksarceusNT
your welcome I'm here to help :D
broken avatar :(
×
broken avatar :(
Location: usUsa
Date Registered: 21 July 2013
Last active: 2 months ago
Posts
53
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
lordkurt6's Groups
lordkurt6's Contact & Social LinkstehfeedzPryZeWaRVii
I got an bad syntax error {

think it might be this line

Code Snippet
Plaintext
user[i] waittill_any( "fake_death", "death", "player_downed")

Double Post Merge: October 24, 2014, 08:43:36 pm
and just let u know one script fully done which may take long time but when it is I give u %50 cred I even put it in the script as well
Last Edit: October 24, 2014, 08:43:36 pm by lordkurt6
broken avatar :(
×
broken avatar :(
Senpai
Location: us
Date Registered: 28 September 2013
Last active: 3 years ago
Posts
605
Respect
Forum Rank
Zombie Enslaver
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
arceus's Groups
Box Mappers Elite
Box Mappers Elite
arceus's Contact & Social LinksarceusNT
yep forgot the ; just add a ; after the )
broken avatar :(
×
broken avatar :(
Location: usUsa
Date Registered: 21 July 2013
Last active: 2 months ago
Posts
53
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
lordkurt6's Groups
lordkurt6's Contact & Social LinkstehfeedzPryZeWaRVii
ok it worked but still few bugs . so when u pickup part model stays there and sethintstring still there when iv pick up part and when I went down model went but sethintstring still there I want it so soon u pick up part model goes and sethintstring and when u go down model come bk and sethintstring to then re pick it bk up other from that everything working when building the part works nicey even when down and get bk up I still have the part and build





Code Snippet
Plaintext
#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;
}

 
Loading ...