Command: "Symbol is never used"
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
pawn Код:
#include <a_samp>
#include <zcmd>

// ...

CMD:setlevel(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "[!] You need to be a higher admin level to use this command.");
    new id, level;
    if(sscanf(params, "ud", id, level)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /setlevel [id/name] [level]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "Invalid player id.");
    if(level > 5) SendClientMessage(playerid, COLOR_RED, "You can't give a player a higher admin level than 5!");
    pStats[id][admin] = 5;
    new string[62], INI:file = INI_Open(Path(id));
    INI_WriteInt(file, "Admin", level);
    INI_Close(file);
    GetPlayerName(playerid, string, MAX_PLAYER_NAME);
    SendClientMessage(playerid, COLOR_WHITE, "You have changed the selected user's admin level.");
    format(string, sizeof(string), "Admin %s has set your admin level to %d.",string,level);
    SendClientMessage(id,COLOR_GREEN,string);
    return 1;
}
Still "Symbol is not used"
Reply


Messages In This Thread
Command: "Symbol is never used" - by [WA]iRonan - 20.12.2013, 11:09
Re: Command: "Symbol is never used" - by Konstantinos - 20.12.2013, 11:32
Re: Command: "Symbol is never used" - by [WA]iRonan - 20.12.2013, 11:37
Re: Command: "Symbol is never used" - by Konstantinos - 20.12.2013, 11:40
Re: Command: "Symbol is never used" - by [WA]iRonan - 20.12.2013, 11:50

Forum Jump:


Users browsing this thread: 1 Guest(s)