SA-MP Forums Archive
/changename problems :l - 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: /changename problems :l (/showthread.php?tid=253413)



/changename problems :l - [ISS]Daniele_Tom - 06.05.2011

Hi!
I have a problem!
I want create /changename for change my name, but I do not know how to do it!
I tried to do so:

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/nome"cmdtexttrue10) == 0)
    {
        
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Change Name","Insert your new name here","Ok","Delete");
        return 
1;
    }
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 1)
    {
        if(
response)
        {
        
SetPlayerName(playerid,inputtext);
        return 
1;
        }
    }
    return 
1;

but dont work! :l

Help mee D:


Re: /changename problems :l - Seven_of_Nine - 06.05.2011

What do you mean? Does it return anything? Return the dialog? Or it just don't set the name?


Re: /changename problems :l - [ISS]Daniele_Tom - 06.05.2011

I can not set the name....


Re: /changename problems :l - Biesmen - 06.05.2011

pawn Код:
if (strcmp("/nome", cmdtext, true) == 0)
{
        ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Change Name","Insert your new name here","Ok","Delete");
        return 1;
}
pawn Код:
if(dialogid == 1)
{
    if(!response) return 1;
    SetPlayerName(playerid,inputtext);
    return 1;
}
Maybe.