setlevel command problem
#2

Try this(untested.):

pawn Код:
CMD:setlevel(playerid, params[])
{
    new giveid, level;
    if(sscanf(params, "uii", giveid, level)) return SendClientMessage(playerid, COL_RED, "SYNTAX: /setlevel <name/id> <level>");
    {
        if(level < 5 || level > 0)
        {
            new name[24], level[128], level1[128],pname[24];
            GetPlayerName(giveid, name, sizeof(name));
            GetPlayerName(playerid, pname, sizeof(pname));
            format(str, sizeof(str), "You have been set to level %d by %s", level, name);
           
            PlayerInfo[giveid][pAdmin] = level;
           
            SendClientMessage(giveid, COL_GREEN, level);
            format(level, sizeof(level1), "You have successfully set %s to level %d", pname, level);
            SendClientMessage(playerid, COL_GREEN, level1);
        }
        else return SendClientMessage(playerid, COL_RED, "Levels are between level 1 through 5!");
    }
}
Reply


Messages In This Thread
setlevel command problem - by Audi_Quattrix - 30.11.2013, 20:27
Re: setlevel command problem - by Mitchy - 30.11.2013, 22:16

Forum Jump:


Users browsing this thread: 1 Guest(s)