[HELP] goto
#1

Hello how can I here ad know it's okay lower level of admin and gamemamster can't port to head admin but how can I make if head admin type goto and id of player is head admin then head admin can port to head admin if you know what I mean? Thanks

if(PlayerInfo[id][Admin] >= 133 return SCM(playerid,COLOR_GRAD2,"You can't goto to head admin!");
Reply
#2

Ok let me get this straight:
1) GMs with lower levels can't teleport to higher level GMs.
2) Admins with lower levels can't teleport to hight level Admins.
3) GMs can't teleport to Admins and Head-Admins.
4) Admins can't teleport to Head-Admins.
5) Head-Admins can teleport to Head-Admins, Admins, GMs.

Is that it? If so, give us the PlayerInfo variables for GMs, Admins and Head-Admins.
Reply
#3

no no gm can't teleport to head admin then admin from lvl 1 to lvl 1337 can't go to head admin and know I want to head admin can teleport to head admin thanks
Reply
#4

pawn Код:
CMD:goto(playerid, params[])
{
    new TargetID, Pos[3];
    if(PlayerInfo[playerid][Admin] >= 1)
    {
        if(sscanf(params, "u", TargetID)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /goto <ID>");
        if(PlayerInfo[TargetID][Admin] >= 1338) return SCM(playerid,COLOR_GRAD2,"You cannot use this command on head admin!");
        GetPlayerPos(TargetID, Pos[0], Pos[1], Pos[2]);
        SetPlayerPos(playerid, Pos[0], Pos[1]+2.0, Pos[2]);
        SendClientMessage(playerid, -1, "Teleported to the selected player.");
    }
    else SendClientMessage(playerid, 0xFF0000AA, "You cannot use this command!");
    return 1;
}
Reply
#5

like that if head admin use /goto to telport do the other head admin it says that he can't use this command but I want to if head admin type goto and if is id a head admin then head admin can teleport to head admin I already have like that. thanks
Reply
#6

Then replace this line

pawn Код:
if(PlayerInfo[TargetID][Admin] >= 1338) return SCM(playerid,COLOR_GRAD2,"You cannot use this command on head admin!");
with this line
pawn Код:
if(PlayerInfo[playerid][Admin] < 1338 && PlayerInfo[TargetID][Admin] >= 1338) return SCM(playerid,COLOR_GRAD2,"You cannot use this command on head admin!");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)