problem (big)
#1

hello everyone

i made an admin island for my server and im in problem there is a road which goes into that area i want that if someone (non-admin) enters that area
he get killed automatically

look its not an interior like admin area it an island made by me and there is a road whgich connects it i want ifd any non admin entrs that area he automatically gets killed
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=235122
Then Check if the player is a admin... if(IsPlayerAdmin(playerid)) .... Then SetPlayerHealth(playerid,0);
Reply
#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
#4

man i cant under stand first i have to make something like a zone or something because cords are of just a point on map
Reply
#5

Yes would be easier if you make a temp zone to make sure the coords work.
Reply
#6

np i can make a adminonly gate btw do u know how to make always moving objects // objects which are always moving
Reply
#7

Yes use MoveObject function
Also check some tutorials.
Reply
#8

i know about move object but wb always moving object
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)