24.01.2010, 11:14
Area check can be easily done. If you don't already have an area check you can easily write a simple one or use previously created ones.
I don't know how your admin system works either, so thats up to you.
Two possibilities, use my hidden checkpoint system(See signature) below and create an admin checkpoint Square, or the following small script:
I don't know how your admin system works either, so thats up to you.
Two possibilities, use my hidden checkpoint system(See signature) below and create an admin checkpoint Square, or the following small script:
pawn Код:
/* _________________ Point 2 North East;
| |
| This is |
| the area that |
| you want |
| to define! |
|________________|
Point 1 South West;
*/
new Float:X1 = , Float:X2 = , Float:Y1 = , Float:Y2 = ;
public OnFilterScriptInit()
{
SetTimer("checkAdminZone", 1000, 1);
}
forward checkAdminZone();
public checkAdminZone()
{
new Float:X, Float:Y, Float:Z;
for(new playerid=0; playerid<GetMaxPlayers(); playerid++)
{
if(!IsPlayerConnected(playerid) || /*your admin check*/ ) continue;
GetPlayerPos(playerid, X, Y, Z);
if(X>X1 && X<X2 && Y>Y1 && Y<Y2)
{
SendClientMessage(playerid, 0xAAAAAAAA, "Admin area only, you die now!");
SetPlayerHealth(playerid, 0.0);
}
}
}