Whats Wrong ?
#1

Hi guys I make /makeadmin cmd from zcmd but when I do [/makeadmin 0 5] its sets my level to 0 else of 5 , I have same bug with same cmd like on /heal....

Here's my code.
pawn Код:
CMD:makeadmin(playerid, params[])
{
         new string[256],giveid,value;
        new sendername[MAX_PLAYER_NAME];
        new giveplayer[MAX_PLAYER_NAME];
            if (PlayerInfo[playerid][pAdminLevel] >= 4)
            {
        if (sscanf(params, "ui", giveid, value))
        return SendClientMessage(playerid,USAGE,"**USAGE:/MakeAdmin [Playerid/PlayerName] [Level]");

                if (value > 5)
                 return SendClientMessage(playerid, GREY,"* Only levels 0-5 Are allowed!");
                 
             GetPlayerName(playerid, sendername, sizeof(sendername));
             GetPlayerName(giveid, giveplayer, sizeof(giveplayer));
             PlayerInfo[giveid][pAdminLevel] = value ;
             format(string,sizeof(string),"Admin %s has set your Admin Level to %d",sendername,value);
             SendClientMessage(giveid,RED,string);
             format(string,sizeof(string),"You gave %s admin level %d",giveplayer,value);
             SendClientMessage(playerid,RED,string);
             }
        return 1;
}
Reply


Messages In This Thread
Whats Wrong ? - by iRana - 26.11.2010, 04:14
Re: Whats Wrong ? - by [L3th4l] - 26.11.2010, 04:43
Re: Whats Wrong ? - by iRana - 26.11.2010, 08:59
Re: Whats Wrong ? - by DarrenReeder - 26.11.2010, 09:04
Re: Whats Wrong ? - by iRana - 26.11.2010, 09:25
Re: Whats Wrong ? - by iRana - 27.11.2010, 05:42
Re: Whats Wrong ? - by DRIFT_HUNTER - 27.11.2010, 06:02
Re: Whats Wrong ? - by iRana - 27.11.2010, 08:23
Re: Whats Wrong ? - by RenisiL - 27.11.2010, 08:26
Re: Whats Wrong ? - by Andrus - 27.11.2010, 08:43

Forum Jump:


Users browsing this thread: 1 Guest(s)