/changename problems :l
#1

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:
Reply
#2

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

I can not set the name....
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)