Advertisement
Guest User

Untitled

a guest
Aug 27th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. if ( AP >= amount )
  2. {
  3. SetPlayerArmourEx ( damagedid, AP - amount );
  4. }
  5. else if ( AP <= 0 )
  6. {
  7. new Float: remainHP = HP - amount;
  8. SetPlayerHealthEx ( damagedid, remainHP );
  9. if ( remainHP <= 1 )
  10. {
  11. OnPlayerDeath( damagedid, playerid, weaponid );
  12. SetPlayerHealthEx ( damagedid, 0.0 );
  13. playerdeath[damagedid] = 1;
  14. }
  15. }
  16. else
  17. {
  18. new Float: remainHP = HP + ( AP - amount );
  19. SetPlayerArmourEx ( damagedid, 0.0 );
  20. SetPlayerHealthEx ( damagedid, remainHP );
  21. if ( remainHP <= 1 )
  22. {
  23. OnPlayerDeath( damagedid, playerid, weaponid );
  24. SetPlayerHealthEx ( damagedid, 0.0 );
  25. playerdeath[damagedid] = 1;
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement