"/admins" command
#2

And if you want my command that sets admins, I have made a customized one by myself, here it is:

pawn Код:
CMD:setadmin(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new targetid, level, adminrank[32];
        new sendername[32], string[128];
        if(sscanf(params, "uis[128]", targetid, level, adminrank))
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /setadmin <playerid> <level> <Admin Rank Name>");
            return 1;
        }
        if(level > 5 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "> Don't go below 0 or higher then 5!"); return 1; }

        if(IsPlayerConnected(targetid))
        {
            //new ranktext[32];
            /*if(PlayerInfo[targetid][pAdmin] == 5) { ranktext = "Trial Admin"; }
            else if(PlayerInfo[targetid][pAdmin] == 4) { ranktext = "Basic Admin"; }
            else if(PlayerInfo[targetid][pAdmin] == 3) { ranktext = "Lead Admin"; }
            else if(PlayerInfo[targetid][pAdmin] == 2) { ranktext = "Head Admin"; }
            else if(PlayerInfo[targetid][pAdmin] == 1) { ranktext = "Owner"; }
            else { ranktext = "Trial Admin"; }*/

            PlayerInfo[targetid][pAdmin] = level;
            SavePlayerStats(playerid);
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string),"> Admin %s has promoted you to a %s(Admin Level:%i)", sendername, adminrank, level);
            SendClientMessage(targetid, 0xFFFFFFFF, string);
        }
    }
    else return SendClientMessage(playerid, 0xFFFFFFFF, "Only Admins can perform this action.");
    return 1;
}
I don't think it has any problem though.
Reply


Messages In This Thread
"/admins" command || PICTURE ADDED! - by Guitar - 24.08.2012, 09:27
Re: "/admins" command - by Guitar - 24.08.2012, 09:29
Re: "/admins" command - by DarkB0y - 24.08.2012, 09:59
Re: "/admins" command - by preda98 - 24.08.2012, 10:02
Re: "/admins" command - by Guitar - 24.08.2012, 10:04
Re: "/admins" command - by preda98 - 24.08.2012, 10:06
Re: "/admins" command - by Guitar - 24.08.2012, 10:18

Forum Jump:


Users browsing this thread: 1 Guest(s)