Argument Type Mismatch (argument 1)
#7

pawn Код:
CMD:makeadmin(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not a Staff Member!");

    new id, level;
    if (sscanf(params, "ud", id, level)) return SendClientMessage(playerid, -1, "Syntax: /makeadmin [id] [level]");
    if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Invalid player");
   
    new INI:File = INI_Open(UserPath(id));
    INI_WriteInt(File, "Admin", level);
    INI_Close(File);
   
    SendClientMessage(playerid, -1, "Staff level has been set!");
   
    new targetid[MAX_PLAYER_NAME], promoter[MAX_PLAYER_NAME], string[84];
    GetPlayerName(id, targetid, sizeof(targetid));
    GetPlayerName(playerid, promoter, sizeof(promoter));
   
    format(string, sizeof(string), "AdmCmd: %s has made %s admin level %d", promoter, targetid, level);
    SendClientMessageToAll(0xAA3333AA, string);
    format(string, sizeof(string), "You have been promoted to admin level %d by %s!", level, promoter);
    SendClientMessage(id, 0x00CED1, string);
    return 1;
}
Reply


Messages In This Thread
Argument Type Mismatch (argument 1) - by canadianclass - 04.01.2014, 15:07
Re: Argument Type Mismatch (argument 1) - by FShiwani - 04.01.2014, 15:29
Re: Argument Type Mismatch (argument 1) - by MatriXgaMer - 04.01.2014, 15:42
Re: Argument Type Mismatch (argument 1) - by Hansrutger - 04.01.2014, 15:45
Re: Argument Type Mismatch (argument 1) - by canadianclass - 04.01.2014, 16:49
Re: Argument Type Mismatch (argument 1) - by iOxide - 04.01.2014, 16:53
Re: Argument Type Mismatch (argument 1) - by Konstantinos - 04.01.2014, 16:57
Re: Argument Type Mismatch (argument 1) - by MatriXgaMer - 04.01.2014, 17:04
Re: Argument Type Mismatch (argument 1) - by canadianclass - 04.01.2014, 17:22
Re: Argument Type Mismatch (argument 1) - by Konstantinos - 04.01.2014, 17:33

Forum Jump:


Users browsing this thread: 5 Guest(s)