06.04.2010, 19:29
pawn Код:
public OnGameModeInit()
{
SetTimer("AreaCheck", 1000, 1);
return 0;
}
forward AreaCheck();
public AreaCheck()
{
for (new playerid = 0, max = GetMaxPlayers(); playerid < m; playerid++)
{
if (IsPlayerConnected(playerid))
{
if (IsPlayerInRangeOfPoint(playerid, 2.0, x, y, z))
{
SetPlayerCheckpoint(playerid, x, y, z, 3.0);
}
else //lets disable it if he's to far away
{
DisablePlayerCheckpoint(playerid);
}
}
}
}