15.02.2009, 20:43
Код:
public IsPlayerInArea() { new Float:X, Float:Y, Float:Z; for(new i=0; i < MAX_PLAYERS; i++) { if (!IsPlayerConnected(i)) continue; GetPlayerPos(i, X, Y, Z); if (X <= -1665 && X >= -1832 && Y <= 973 && Y >= 784) { SetPlayerHealth(i, 999999.9); InArea[i] = 1; } else if (InArea[i] == 1) { SetPlayerHealth(i, 100); InArea[i] = 0; } } }
Код:
OnPlayerConnect(playerid) { [...] InArea[playerid] = 0; [...] }