[dcmd] setlevel dosen't work
#4

Quote:
Originally Posted by CyberGhost
Посмотреть сообщение
pawn Код:
dcmd_setlevel(playerid, params[])
{
    if(PlayerInfo[playerid][AdminLevel] != 10) return SendClientMessage(playerid, 0xFF0000AA, "You must be administrator level 10 to use that command!");
    {
        new targetid, level;
        if(sscanf(params, "ud", targetid, level)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /setlevel [playerid | name] [level]");
        else if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFF0000AA, "Player not found");
        {
            new targetname[MAX_PLAYER_NAME], string[44];
            GetPlayerName(targetid, targetname, sizeof(targetname));
            PlayerInfo[targetid][AdminLevel] = level;
            format(string, sizeof(string), "You have set player %s to AdminLevel %s", targetname, level);
            SendClientMessage(playerid, 0xFF0000AA, string);
        }
    }
    return 1;
}
thanks! works perfectly!
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: 6 Guest(s)