02.08.2012, 22:43
There is a building in Los Santos, and in a specific floor I set it for admins to enter, however if a player enters that floor, he will die, I used the following function to fix this issue. However there is a problem...
Is it possible to have a players height coordinates in this function in the server? Pawn complies it just fine, but it doesn't seem to work.
Is it possible to have a players height coordinates in this function in the server? Pawn complies it just fine, but it doesn't seem to work.
pawn Код:
public isPlayerInArea()
{
new Float:X, Float:Y, Float:Z; //We use this to store player position
foreach(Player, i) //This line defines a name for all player, the name is "i"
{
GetPlayerPos(i, X, Y, Z); //Here we are storing the player position on the variables X, Y, and Z defined previously
if (X <= 1835 && X >= 1768 && Y <= -1269 && Y >= -1316 && Z == 125.73)
{
SetPlayerHealth(i, 0);
}
}
}