08.11.2010, 16:47
pawn Код:
new pKill[MAX_PLAYERS];
new pCount[MAX_PLAYERS];
if(IsPlayerInArea(playerid, x_MAX, x_MIN, y_MAX, y_MIN))
{
if(!IsPlayerAdmin(playerid))
{
pKill[playerid] = SetTimerEx("KillTime", 15000, false, "i", playerid);
}
return 1;
}
else if(!IsPlayerInArea(playerid, x_MAX, x_MIN, y_MAX, y_MIN))
{
KillTimer(pKill(playerid));
pCount[playerid] = 15;
return 1;
}
forward KillTime(playerid);
public KillTime(playerid)
{
pCount[playerid]--;
if(pCount > 15)
{
SetPlayerHealth(playerid, 0.0);
pCount[playerid] = 15;
}
}