04.05.2016, 12:33
Quote:
Basically this:
Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart) { new Float:Health; GetPlayerHealth(damagedid, Health); if(playerid != INVALID_PLAYER_ID) { SetPlayerHealth(damagedid, Health); } return 1; } |
Say the player that got hit has 30 HP.
The damage dealt was 40, killing the player.
Then the callback is called with your code which sets his health back to 30, but he's already dead because the callback is called after the damage is already done.