20.12.2010, 10:33
Hi all,i wanna make something:
If player has < 20 HP,a gametext will appear saying "YOU ARE HURT,GO TO COVER" and player will lose 5 hp every minute.
I need to do this with GetPlayerHealth?
For now i maked this:
I need only timer to lose hp every minute
If player has < 20 HP,a gametext will appear saying "YOU ARE HURT,GO TO COVER" and player will lose 5 hp every minute.
I need to do this with GetPlayerHealth?
For now i maked this:
pawn Код:
public OnPlayerUpdate(playerid)
{
new Float:hp;
GetPlayerHealth(playerid,hp);
if (hp < 20.0)
{
GameTextForPlayer(playerid, "~g~You are ~r~hurt,go to ~y~cover~n~~h~", 6000, 6);
}
return 1;
}