public isPlayerInArea() { new Float:X, Float:Y, Float:Z; //We use this to store player position for(new i=0; i < MAX_PLAYERS; 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 <= -3915 && X >= -3694 && Y <= 401 && Y >= 37) /* This line is the important one!. Here, is where you change those numbers, by the ones you get from the /pos command. As you can see, those coordinates, are only the X and Y ones, the Z doesnt matter*/ { SetPlayerHealth(i, -999999.9); //This will ensure, that our player gets killed if he tries to enter } } }
public isPlayerInArea() {
New Float:X, Float:Y, Float:Z;
For(new i=0; i < MAX_PLAYERS; i++) {
GetPlayerPos(i, X, Y, Z);
if (X <= -3915 && X >= -3694 && Y <= 401 && Y >= 37 && gWanted[playerid] == 1) SetPlayerHealth(i, -999999.9);
}
}
if (X <= -3915 && X >= -3694 && Y <= 401 && Y >= 37 && gWanted[playerid] == 1) return SetPlayerHealth(i, -999999.9);
if (X <= -3915 && X >= -3694 && Y <= 401 && Y >= 37 && PlayerInfo[i][gWanted])
if (X <= -3915 && X >= -3694 && Y <= 401 && Y >= 37 && gWanted[playerid] == 1) SetPlayerHealth(i, -999999.9);[/pawn]
|
public isPlayerInArea() { new Float:X, Float:Y, Float:Z; //We use this to store player position for(new i=0; i < MAX_PLAYERS; 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 <= -3915 && X >= -3694 && Y <= 401 && Y >= 37) /* This line is the important one!. Here, is where you change those numbers, by the ones you get from the /pos command. As you can see, those coordinates, are only the X and Y ones, the Z doesnt matter*/ { SetPlayerHealth(i, -999999.9); //This will ensure, that our player gets killed if he tries to enter } } }