Help me in fixing /setadmin command bug.
#2

pawn Код:
CMD:setadmin(playerid,params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new level, targetid;
        if(sscanf(params,"ud", targetid, level))
        {
            SendClientMessage(playerid, -1,"USAGE: /setadmin [playerid] [level]");
            return 1;
        }
        if(level > 4) return SendClientMessage(playerid, COLOR_BRIGHTRED, "SERVER: Maximum Administrator level is 4.");
        if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_BRIGHTRED, "That player is not connected!");
        new MyString[128];
        new TargetString[128];
        format(MyString,sizeof MyString, "Administrator level set.", targetid, level);
        format(TargetString,sizeof TargetString, "You have been promoted to a Administrator. /help for more information");
        SendClientMessage(targetid, COLOR_LIGHTCYAN, TargetString );
        SendClientMessage(playerid, COLOR_GREEN, MyString);
        PlayerInfo[targetid][pAdmin] = level;
        return 1;
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "You're not authorized to use that command!");
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
Help me in fixing /setadmin command bug. - by Champ - 13.07.2013, 09:50
Re: Help me in fixing /setadmin command bug. - by ToiletDuck - 13.07.2013, 09:56
Re: Help me in fixing /setadmin command bug. - by Champ - 13.07.2013, 10:03
Re: Help me in fixing /setadmin command bug. - by RALL0 - 13.07.2013, 10:06
Re: Help me in fixing /setadmin command bug. - by Champ - 13.07.2013, 10:10
Re: Help me in fixing /setadmin command bug. - by RALL0 - 13.07.2013, 10:11
Re: Help me in fixing /setadmin command bug. - by JaKe Elite - 13.07.2013, 10:13
Re: Help me in fixing /setadmin command bug. - by Champ - 13.07.2013, 10:14
Re: Help me in fixing /setadmin command bug. - by JaKe Elite - 13.07.2013, 10:17
Re: Help me in fixing /setadmin command bug. - by Champ - 13.07.2013, 10:24

Forum Jump:


Users browsing this thread: 1 Guest(s)