Advertisement
ijontichy

<stdin>

Sep 1st, 2012
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. script RJX2_REDARMOR (int healTo)
  2. {
  3. int healHP = healTo;
  4. int pln = PlayerNumber();
  5.  
  6. if (usingArmor[pln]) { terminate; }
  7. usingArmor[pln] = 1;
  8.  
  9. if (healTo <= 0)
  10. {
  11. healHP = getSpawnHP() - healTo;
  12. }
  13.  
  14. LocalAmbientSound("misc/i_pkup", 127);
  15. FadeRange(255, 255, 0, 0.25, 0,0,0, 0.0, 0.4);
  16. GiveInventory("RedArmor", 1);
  17. Delay(18);
  18.  
  19. if (GetActorProperty(0, APROP_Health) < healHP)
  20. {
  21. LocalAmbientSound("misc/p_pkup", 127);
  22. FadeRange(0, 128, 255, 0.25, 0,0,0, 0.0, 0.4);
  23. SetActorProperty(0, APROP_Health, healHP);
  24. Delay(18);
  25. }
  26.  
  27. usingArmor[pln] = 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement