how do you edit ladmin?
#1

I want only level 3 admins able to kick, anyone know how to do this?
Reply
#2

Depends on your script, your admin variables. Can you show us the kick command?
Reply
#3

Go in your script, go to the line /kick or cmd:kick. Check your admin coding so Example: PlayerInfo[playerid][pAdmin] >= 1 change the 1 to a 3. It's a bit hard to imagine your coding, so I'd like you to show us the kick command in your gamemode if you want help with the shit.
Reply
#4

this if(PlayerInfo[playerid][Level] >= 2) {?
Reply
#5

Can you post the cmd:kick line and the administrator ranks here (I'd like to see ranks)? Thank you in advance.
Reply
#6

make it if(PlayerInfo[playerid][Level] >= 3)
Reply
#7

pawn Код:
dcmd_kick(playerid,params[]) {
    if(PlayerInfo[playerid][LoggedIn] == 1) {
        if(PlayerInfo[playerid][Level] >= 3) {// you can adjust this value
            new tmp[256], tmp2[256], Index;     tmp = strtok(params,Index), tmp2 = strtok(params,Index);
            if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /kick [playerid] [reason]");
            new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
            player1 = strval(tmp);

            if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid && (PlayerInfo[player1][Level] != ServerInfo[MaxAdminLevel]) ) {
                GetPlayerName(player1, playername, sizeof(playername));     GetPlayerName(playerid, adminname, sizeof(adminname));
                CMDMessageToAdmins(playerid,"KICK");
                if(!strlen(tmp2))
                 {
                    format(string,sizeof(string),"%s has been kicked by an Administrator : no reason given ",playername);
                    SendClientMessageToAll(pink,string);
                    SaveToFile("KickLog",string);
                    SendClientMessage(pink,player1,string);
                    print(string);
                    return Kick(player1);
                }
                else
                 {
                    format(string,sizeof(string),"%s has been kicked by an Administrator  reason: %s ",playername,params[2]);
                    SendClientMessageToAll(pink,string);
                    SendClientMessage(pink,player1,string);
                    SaveToFile("KickLog",string);
                    print(string);
                    return Kick(player1);
                 }
            } else return SendClientMessage(playerid, red, "Player is not connected or is yourself or is the highest level admin");
        } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
    } else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}
Код:
I want only level 3 admins able to kick, anyone know how to do this?
hmm if you only want level 3(not greater) admin to use this command.
replace with
pawn Код:
if(PlayerInfo[playerid][Level] == 3)
* This command is taken from ladmin to compare with your FS
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)