13.09.2015, 13:23
Quote:
Код:
SetPlayerHealth(playerid, GetPlayerHealth(playerid)+amount); SetPlayerHealth(issuerid, GetPlayerHealth(playerid)-amount); |
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) { if(issuerid != INVALID_PLAYER_ID) { if(IsPlayerInRangeOfPoint(playerid, range, x, y, z)) { new Float:hp; GetPlayerHealth(playerid, hp); SetPlayerHealth(playerid, hp + amount); GetPlayerHealth(playerid, hp); SetPlayerHealth(issuerid, hp - amount); } } return 1; }