Makeadmin
#1

So, i've been scripting my /makeadmin cmds, and other cmds, but i know i am missing a line or two.
Currently everything works, so if you do /makeadmin Dobby 8, his admin level will be set to 8. but once i do /makeadmin, without anything behind, it sets dobby's adminlevel to 0.

CMD:
pawn Код:
CMD:makeadmin(playerid, params[])
{
            new admin, playerb;
            if(PlayerInfo[playerid][pAdmin] < 8) return SendClientMessage(playerid, COLOR_REDD, "[ERROR] You do not have the right's to use this command!");
            if(sscanf(params, "ui", playerb, admin)) SendClientMessage(playerid, COLOR_LGREEN, "Usage: /makeadmin [playerid/partname] [level]");
            {
              PlayerInfo[playerb][pAdmin] = admin;
              SendClientMessage(playerb, -1, "Your admin level has been changed!"); // i know these 2 lines look's gay, but i cba to change them xD
              SendClientMessage(playerid, -1, "You changed their admin level!");
              return 1;
            }
}
Reply


Messages In This Thread
Makeadmin - by ThaCrypte - 11.08.2013, 20:51
Re: Makeadmin - by EmpireSk - 11.08.2013, 20:54
Re: Makeadmin - by ThaCrypte - 11.08.2013, 20:58
Re: Makeadmin - by EmpireSk - 11.08.2013, 21:10
Re: Makeadmin - by RedJohn - 11.08.2013, 21:29

Forum Jump:


Users browsing this thread: 1 Guest(s)