23.03.2013, 15:51
This could be used as an include if you wanted to. If not, take the code from the hook statements and put it into the correct callbacks.
You'll need y_timers for this to work.
pawn Код:
#include <a_samp>
#include <YSI\y_timers>
#include <YSI\y_hooks>
new
g_Spawned[MAX_PLAYERS] = false
;
ptask removeHealthPoint[1000](playerid)
{
if(g_Spawned[playerid])
{
new
Float:fHealth
;
GetPlayerHealth(playerid, fHealth);
SetPlayerHealth(playerid, fHealth-1);
}
return 1;
}
hook OnPlayerDeath(playerid, reason)
{
g_Spawned[playerid] = false;
return 1;
}
hook OnPlayerSpawn(playerid)
{
g_Spawned[playerid] = true;
return 1;
}