23.03.2013, 16:02
here you go without y_hooks and y_timers
pawn Код:
#include <a_samp>
main () { }
new
bool:g_Spawned[MAX_PLAYERS] = false
;
public OnPlayerConnect(playerid)
{
SetTimerEx("RemoveHealthPoint", 1000, true,"i",playerid); //put this where you want your timer
return 1;
}
forward RemoveHealthPoint(playerid);
public RemoveHealthPoint(playerid)
{
if(g_Spawned[playerid])
{
new
Float:fHealth
;
GetPlayerHealth(playerid, fHealth);
SetPlayerHealth(playerid, fHealth-1);
}
return 1;
}
public OnPlayerDeath(playerid,killerid,reason)
{
g_Spawned[playerid] = false;
return 1;
}
public OnPlayerSpawn(playerid)
{
g_Spawned[playerid] = true;
return 1;
}