coolbunny1234

super penis

Mar 4th, 2013
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.72 KB | None | 0 0
  1. //Crippler shit done
  2. main_watcher()
  3. {
  4. level thread give_score_shit();
  5. wait 1;
  6. level thread pakadoor();
  7. wait 3;
  8. level thread move_machine();
  9. level thread delete_trig();
  10. wait 3;
  11. }
  12. pakadoor()
  13. {
  14. pakadoor = getent( "pack_door", "targetname" );
  15. pakadoor movez(-150,3.5,3);
  16. wait 1;
  17. pakadoor playsound( "packa_door_1" );
  18. wait 5;
  19. pakadoor movez( 150, 3.5, 3 );
  20. wait 1;
  21. pakadoor playsound( "packa_door_2" );
  22. }
  23. move_machine()
  24. {
  25.     paka = GetEntArray("zombie_vending_upgrade", "targetname");
  26.     for(i=0; i<paka.size; i++ )
  27.     {
  28.         level.packapunch = getent(paka[i].target, "targetname");
  29.         if(isDefined(level.packapunch))
  30.         {
  31.             level.packapunch moveto((-54,440,93),3);wait 3;
  32.             playFx( level._effect["poltergeist"], (-54,440,93) );
  33.             level.packapunch setmodel("zombie_vending_packapunch_on");
  34.         }
  35.         level thread add_zombie_hint("Text1", &"ZOMBIE_PERK_PACKAPUNCH");
  36.         level.paptrig = spawn("trigger_radius", level.packapunch.origin, 1, 50, 20);
  37.         level.paptrig setCursorHint("HINT_NOICON");
  38.         level.paptrig useTriggerRequireLookAt();
  39.         level.paptrig set_hint_string( level.paptrig, "Text1");
  40.         packa_rollers = spawn("script_origin", level.packapunch.origin);
  41.         packa_timer = spawn("script_origin", level.packapunch.origin);
  42.         packa_rollers playloopsound("packa_rollers_loop");
  43.         for(;;)
  44.         {
  45.         level.paptrig waittill("trigger", Player );
  46.         if( Player useButtonPressed() && !isDefined(Player.using_controlMenu) && !isDefined(Player.revivetrigger) && Player.score >= 500)
  47.         //if( Player useButtonPressed() && Player.score >= 500 ) this makes the trig too sensitive, meaning press x and it does it 3+ times
  48.             {
  49.                 //set the cost to 500 for testing
  50.                 Player iPrintlnBold( "^2UPGRADING......" );
  51.                 Player.using_controlMenu = true;
  52.                 Player thread give_gun_upgraded();
  53.                 Player maps\_zombiemode_score::minus_to_player_score( 500 );
  54.                 level.paptrig playsound( "bottle_dispense3d" );
  55.             }
  56.             else
  57.             {
  58.                 //this keeps looping letting you know, so the sound and dialog repeat if you're in radius
  59.                 level.paptrig playsound("deny");
  60.                 Player thread maps\_zombiemode_perks::play_no_money_perk_dialog();
  61.                 //Player iPrintln("^1Dev: Not enough money yo");
  62.             }
  63.         }
  64.     }
  65. }
  66. give_score_shit(){
  67. //deleted how u did the score so i added this
  68. p=get_players();
  69.     for(b=0;b<=p.size;b++){
  70.         p[b].score = 5000;
  71.         p[b].score_total = 5000;
  72.     }
  73. }
  74. //this is out of the strat im working on, edited to work with this, threw in the knuckle crack as well:p
  75. give_gun_upgraded(){
  76.     PrecacheItem("zombie_knuckle_crack");
  77.     currentWeapon = self getCurrentWeapon();
  78.     gun = currentWeapon+"_upgraded";
  79.     PrecacheItem( gun );
  80.     self takeWeapon(self getCurrentWeapon());
  81.     self giveweapon("zombie_knuckle_crack");
  82.     self switchtoweapon("zombie_knuckle_crack");
  83.     wait 1.5;
  84.     self giveweapon( gun );
  85.     self switchToWeapon( gun );
  86.     self iPrintln("Equipped Upgraded ^1 " +gun);
  87.     self.using_controlMenu = undefined; //resets trig
  88. }
  89. delete_trig()
  90. {
  91.         old_trig = GetEntArray("zombie_vending_upgrade", "targetname");
  92.         for( k = 0; k < old_trig.size; k++ )
  93.             {
  94.                 old_trig delete();
  95.             }
  96. }
  97.  
  98. add_zombie_hint( ref, text )
  99. {
  100.     if( !IsDefined( level.zombie_hints ) )
  101.     {
  102.         level.zombie_hints = [];
  103.     }
  104.     PrecacheString( text );
  105.     level.zombie_hints[ref] = text;
  106. }
  107. get_zombie_hint( ref )
  108. {
  109.     if( IsDefined( level.zombie_hints[ref] ) )
  110.     {
  111.         return level.zombie_hints[ref];
  112.     }
  113.     return level.zombie_hints["undefined"];
  114. }
  115. set_hint_string( ent, default_ref )
  116. {
  117.     if( IsDefined( ent.script_hint ) )
  118.     {
  119.         self SetHintString( get_zombie_hint( ent.script_hint ) );
  120.     }
  121.     else
  122.     {
  123.         self SetHintString( get_zombie_hint( default_ref ) );
  124.     }
  125. }
Advertisement
Add Comment
Please, Sign In to add comment