Admin Commands Issue
#5

Quote:
Originally Posted by Clad
Посмотреть сообщение
Your killing your /makeadmin command, Adding useless things won't help you.
pawn Код:
CMD:makeadmin(playerid, params[])
{
    if(PlayerInfo[playerid][pAdminLevel] < 5) return SendClientMessage(playerid, COLOR_GREY, "You're not authorized to use that command");
            new targetid,level,string[256];
            if(sscanf(params, "ud", targetid, level)) return  SendClientMessage(playerid,-1,"/makeadmin [playerid] [level]");
   
                        PlayerInfo[PID][pAdminLevel] = level;

   
    if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_RED, "Player is not connected!");

    format(str, sizeof(str), "%s Has set %s admin level to %s ", PlayerName(playerid), PlayerName(targetid), level);

    foreach(Player, i)
    {
        if(PlayerInfo[i][pAdminLevel] > 0) return SendClientMessage(i,COLOR_YELLOW,str);
    }

    return 1;
}
Thanks, i don't see what was useless but what about the /a command?
Reply


Messages In This Thread
Admin Commands Issue - by Cole_William - 18.07.2014, 16:48
Re: Admin Commands Issue - by Blademaster680 - 18.07.2014, 16:51
Re: Admin Commands Issue - by Cole_William - 18.07.2014, 16:54
Re: Admin Commands Issue - by Clad - 18.07.2014, 16:55
Re: Admin Commands Issue - by Cole_William - 18.07.2014, 16:59
Re: Admin Commands Issue - by Dignity - 18.07.2014, 16:59
Re: Admin Commands Issue - by Clad - 18.07.2014, 17:02
Re: Admin Commands Issue - by Konstantinos - 18.07.2014, 17:04
Re: Admin Commands Issue - by Cole_William - 18.07.2014, 17:07
Re: Admin Commands Issue - by Clad - 18.07.2014, 17:13

Forum Jump:


Users browsing this thread: 2 Guest(s)