Quote:
Originally Posted by Tree of Fat
pawn Код:
new Float:PlayerHP[MAX_PLAYERS]; forward OnPlayerHealthReduced(playerid, Float:hp);
public OnPlayerConnect(playerid) { PlayerHP = 100.0; return 1; }
public OnPlayerUpdate(playerid) { new Float:hp; GetPlayerHealth(playerid, hp); if (PlayerHP[playerid] > hp) { OnPlayerHealthChange(playerid, oldhealth, newhealth); } PlayerHP[playerid] = hp; return 1; }
public OnPlayerHealthReduced(playerid, Float:hp) { // And with this, you can detect if a player's health has changed. return 1; }
Now shut the hell up.
|
correction: PlayerHP[playerid] = 100.0;
"Now shut the hell up." mlol