[HELP] SetPlayerName
#1

i got an ERROR

pawn Код:
new tmp[128];
new aPlayer[20];
pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    if(IsPlayerAdmin(playerid))
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Admin Menu", "Kick", "Ok", "Cancel");

        new id = strval(tmp);
        if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF,"Invalid ID");
        aPlayer[playerid] = clickedplayerid;
        return 1;
    }
    return 0;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
    {
    switch(dialogid)
        {
        case 1:
            {
            switch(listitem)
                {
                    case 0: ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Change Player Name", "Enter the new player name", "Submit", "Cancel");
                }
            }
            case 2:
            {
                if(strlen(inputtext) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "ERROR: Your new name was too long. Max: 50 characters");
                SetPlayerName(aPlayer[playerid], "%s", inputtext); //<--- Line 36
            }
       }
   }
return 0;
}
ERROR:!
pawn Код:
ЁC:\Users\Larsey123\NameChange.pwn(36) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
Reply
#2

https://sampwiki.blast.hk/wiki/SetPlayerName
Reply
#3

pawn Код:
SetPlayerName(aPlayer[playerid],inputtext);
Reply
#4

Thanks to willsuckformoney
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)