Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( AP >= amount )
- {
- SetPlayerArmourEx ( damagedid, AP - amount );
- }
- else if ( AP <= 0 )
- {
- new Float: remainHP = HP - amount;
- SetPlayerHealthEx ( damagedid, remainHP );
- if ( remainHP <= 1 )
- {
- OnPlayerDeath( damagedid, playerid, weaponid );
- SetPlayerHealthEx ( damagedid, 0.0 );
- playerdeath[damagedid] = 1;
- }
- }
- else
- {
- new Float: remainHP = HP + ( AP - amount );
- SetPlayerArmourEx ( damagedid, 0.0 );
- SetPlayerHealthEx ( damagedid, remainHP );
- if ( remainHP <= 1 )
- {
- OnPlayerDeath( damagedid, playerid, weaponid );
- SetPlayerHealthEx ( damagedid, 0.0 );
- playerdeath[damagedid] = 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement