19.12.2015, 15:35
Im trying to make a safe zone and when i go to that location it doesnt work can anyone help me please ?
PHP код:
new InArea[MAX_PLAYERS];
forward IsPlayerInArea();
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 <= -727.7371 && X >= -780.7371 && Y <= 853.6052 && Y >= 753.6052 && Z <= 324.8097 && Z >= 315.8097)
{
SetPlayerHealth(i, 999999.9);
InArea[i] = 1;
}
else if (InArea[i] == 1)
{
SetPlayerHealth(i, 100);
InArea[i] = 0;
}
}
}