Help | OnDialogResponse
#1

Hello,

i'm trying to do DialogResponse on my our server,
I did this code in : OnPlayerConnected:

Код:
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Write Something","Write Here Something:","Enter","Cancel");
And this code in : OnDialogResponse:
Quote:

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 2)
{
new message[256+1];
format(message, 256, "You replied: %s", inputtext);
SendClientMessage(playerid, 0xFFFFFFFF, message);
}
else
{
SendClientMessage(playerid, COLOR_RED, "Error");
}
return 1;
}

when i enter to my server and write somthing on dialog form and click enter its dont send
You repilied: *my text*

Why?
Reply
#2

try to do

if( response ) { new message and other stuff } else if ( !response ) { bla this is the 2nd button }

Reply
#3

nvm i success to get solution. :] but thanks anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)