SA-MP Forums Archive
[HELP] SetPlayerName - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] SetPlayerName (/showthread.php?tid=197716)



[HELP] SetPlayerName - Larsey123IsMe - 10.12.2010

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.



Re: [HELP] SetPlayerName - Th3Angel - 10.12.2010

https://sampwiki.blast.hk/wiki/SetPlayerName


Re: [HELP] SetPlayerName - willsuckformoney - 10.12.2010

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



Re: [HELP] SetPlayerName - Larsey123IsMe - 10.12.2010

Thanks to willsuckformoney