11.10.2011, 20:05
pawn Код:
new TimerGiveHP[MAX_PLAYERS];//topo do GM
//onplayerconect
TimerGiveHP[playerid] = SetTimerEx("HealthXXX", 1000, true, "i", playerid);
//onplayerdisconect
KillTimer(TimerGiveHP[playerid]);
//fora de funзхes
forward HealthXXX(playerid);
public HealthXXX(playerid)
{
if(DistanciaPontos(1607.537353, 1817.338500, ppx, ppy) < 3)
{
new Float:hp;
GetPlayerHealth(playerid, hp);
if(hp <= 100)
SetPlayerHealth(playerid, hp++);// c n funcionar acom hp++ tenta hp+1
}
return 1;
}