20.08.2009, 09:46
pawn Код:
forward PlayerInAreaCheck(playerid);
pubic PlayerInAreaCheck(playerid)
{
for(new i = 0, max = GetMaxPlayers(); i < max; i++)
{
if(!IsPlayerConnected(playerid)) continue;
if(IsPlayerInArea(i, 1543, 1608, -1634, -1602))
{
if(gTeam[i] == TEAM_CIVILIAN)
{
GameTextForPlayer(playerid,"~y~ You Died For Being On Police Property",5000,5);
SetPlayerHealth(i, -999999.9);
}
}
}
return 1;
}
public OnPlayerConnect(playerid)
{
SetTimer("PlayerInAreaCheck", 1000, 1, "i", playerid);
return 1;
}