#3

If you can't bother downloading the plugin use this code.

pawn Код:
public OnPlayerUpdate(playerid)
{
     if (IsPlayerInArea(playerid, areaminx, areamaxx, areaminy, areamaxy)) // change the parameters
     {
         if (IsPlayerAdmin(playerid)) {
               SendClientMessage(playerid, -1, "Welcome to the admin area");
         }else{
               SendClientMessage(playerid, -1, "You are not an admin to enter the admin area!"),
               SetPlayerHealth(playerid, -1);
         }
     }
}
stock IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    if (x > minx && x < maxx && y > miny && y < maxy) return 1;
    return 0;
}
Reply


Messages In This Thread
help - by Loading... - 03.07.2011, 20:18
Re: help - by [L3th4l] - 03.07.2011, 20:24
Re: help - by admantis - 03.07.2011, 20:25
Re: help - by Loading... - 03.07.2011, 20:33

Forum Jump:


Users browsing this thread: 1 Guest(s)