SA-MP Forums Archive
admin area help needed - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: admin area help needed (/showthread.php?tid=439729)



admin area help needed - speediekiller2 - 26.05.2013

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


Re: admin area help needed - ThePrograme - 26.05.2013

Well here is explained how to check the area for players now you just make if the player is not admin kill him https://sampwiki.blast.hk/wiki/Areacheck


Re: admin area help needed - speediekiller2 - 26.05.2013

yeah but how it works with x and y?


Re: admin area help needed - ThePrograme - 26.05.2013

Well something like this:
pawn Код:
if(GetPlayerPos(playerid, X, Y, Z) == the area coordinantes)
Not pro scripter so this might not work


Re: admin area help needed - speediekiller2 - 26.05.2013

haha no that isnt im a littlebit good at scripting but thats to get the coordinates i have this:

Quote:

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;
}




Re: admin area help needed - speediekiller2 - 26.05.2013

anybody?