Advertisement
natesmithzombies

shootable_perk_slot

Dec 27th, 2016
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 KB | None | 0 0
  1. function main_shootable_perk_slot()
  2. {
  3.     trigs = GetEntArray( "shootale_perk_slot", "targetname" );
  4.     level.shot_perk_slots = 0;
  5.     level.shot_perk_slots_goal = trigs.size;
  6.     foreach( trig in trigs )
  7.         trig thread waittill_shot();
  8. }
  9.  
  10. function waittill_shot()
  11. {
  12.     self waittill( "trigger", player );
  13.     level.shot_perk_slots++;
  14.     player PlayLocalSound( "meteor_affirm" ); // change to any sound you want to play to the player
  15.     if( level.shot_perk_slots == level.shot_perk_slots_goal )
  16.         reward_all_players();
  17. }
  18.  
  19. function reward_all_players()
  20. {
  21.     players = GetPlayers();
  22.     foreach( player in players )
  23.         nsz_powerup_empty_bottle::grab_bottle( player );
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement