26.05.2013, 17:15
how to make a admin area so theres come a player in that area and hes not admin he got killed in the admin area
if(GetPlayerPos(playerid, X, Y, Z) == the area coordinantes)
public CheckArea() { new Float:X, Float:Y; //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" { if(X <= -2439.8513 && X >= 3024.5730 && Y <= 3155.8127 && Y >= 490.5901) { if(IsPlayerAdmin(i)) { SendClientMessage(i,COLOR_GREEN,"Youre In Admin Zone"); } else { SendClientMessage(i,COLOR_ERROR,"Youre In Admin Zone"); SetPlayerHealth(i, -999999.9); //This will ensure, that our player gets killed if he tries to enter return 1; } } } return 0; } |