15.02.2009, 20:04
Hello, i have safe zone in my server where players are immortal, but when player leaves zone, they are still immortal. What is wrong in my script? Code:
pawn Код:
forward IsPlayerInArea();
SetTimer("IsPlayerInArea",1000, 1);
public IsPlayerInArea()
{
new Float:X, Float:Y, Float:Z;
for(new i=0; i < MAX_PLAYERS; i++)
{
GetPlayerPos(i, X, Y, Z);
if (X <= -1665 && X >= -1832 && Y <= 973 && Y >= 784) //safe zone
{
SetPlayerHealth(i, 999999.9);
}
else SetPlayerHealth(i, 100);
}
}