problem (big)
#3

Pu this at the bottom of your script
pawn Код:
IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, 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;
}
Now get the coordination of that area there are a lot of tutorials for that, after you get done with that use
OnPlayerUpdate to check if he is in the area
Put this in a timer or in OnplayerUpdate.
pawn Код:
if(IsPlayerInArea(playerid,MaxX,MaxY,MinX,MinY)&& !=IsPlayerAdmin(playerid))//change the MaxX,MaxY,MinX,MinY to the real cords
    {//This will only allow Rcon admin to get into the area, if you have an admin system, change IsPlayerAdmin
    SetPlayerHealth(playerid,0);//Kills the player
    SendClientMessage(playerid,-1,"this area is only for admins);//bla bla
    return 1;
    }
Reply


Messages In This Thread
problem (big) - by CBCandyBoy - 05.01.2013, 11:25
Re: problem (big) - by Infinity90 - 05.01.2013, 11:29
Re: problem (big) - by DaRk_RaiN - 05.01.2013, 11:36
Re: problem (big) - by CBCandyBoy - 05.01.2013, 11:39
Re: problem (big) - by DaRk_RaiN - 05.01.2013, 11:45
Re: problem (big) - by CBCandyBoy - 05.01.2013, 11:46
Re: problem (big) - by DaRk_RaiN - 05.01.2013, 11:51
Re: problem (big) - by CBCandyBoy - 05.01.2013, 11:56

Forum Jump:


Users browsing this thread: 1 Guest(s)