Advertisement
RyanCordell

Kyle OP

Oct 9th, 2014
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. SCRIPT "WeaponAmmoHalf" (void)
  2. {
  3.     int blink = 0;
  4.     Delay(45*35);
  5.     for(int i = 0; i < 6; i++)
  6.     {
  7.         ActivatorSound("items/runout",69);
  8.         if(blink == 0){
  9.             TakeInventory("weapon_ammopowerup",999);
  10.             blink = 1;
  11.         }
  12.         else{
  13.             GiveInventory("weapon_ammopowerup",1);
  14.             blink = 0;
  15.         }
  16.         Delay(1*35);
  17.     }
  18.     TakeInventory("weapon_ammopowerup",999);
  19.     Terminate;
  20. }
  21.  
  22. int save_counter = 0;
  23.  
  24. SCRIPT "SpareAmmo" (void)
  25. {
  26.     if(CheckInventory("weapon_ammopowerup") > 0){
  27.         if(save_counter == 0){
  28.             save_counter = 1;
  29.             SetResultValue(1);
  30.         }
  31.         else{
  32.             save_counter = 0;
  33.             SetResultValue(0);
  34.         }
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement