[dcmd] setlevel dosen't work
#1

i need help with this dcmd code D:

it compiles right but it says you need to be admin lvl 10 when i am lvl 10 O.o

if someone can fix this it would be very helpful!
pawn Код:
dcmd_setlevel(playerid, params[])
{
    new
    id,
    lvl;
    if (sscanf(params, "uc", id, lvl)) SendClientMessage(playerid, 0xFF0000AA, "USAGE: /setlevel playerid level");
    else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
    if(lvl >= 10) return SendClientMessage(playerid, 0xFF0000AA, "You must be administrator level 10 to use that command!");
    else
    {
        if(PlayerInfo[playerid][AdminLevel] >= 10) return 0;
        PlayerInfo[playerid][AdminLevel] = lvl;
        new name[MAX_PLAYER_NAME], string2[44];
        GetPlayerName(playerid, name, sizeof(name));
        format(string2, sizeof(string2), "You have set player %s to AdminLevel %s",name,lvl);
        SendClientMessage(playerid,0xFF0000AA,string2);

    }
    return 1;
}
Reply


Messages In This Thread
[dcmd] setlevel dosen't work - by jonnyboy - 13.05.2011, 16:34
Re: [dcmd] setlevel dosen't work - by Seven_of_Nine - 13.05.2011, 16:37
Re: [dcmd] setlevel dosen't work - by Laronic - 13.05.2011, 16:42
Re: [dcmd] setlevel dosen't work - by jonnyboy - 13.05.2011, 16:48

Forum Jump:


Users browsing this thread: 4 Guest(s)