Help | OnDialogResponse - 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 | OnDialogResponse (
/showthread.php?tid=124162)
Help | OnDialogResponse -
Daniel13145 - 29.01.2010
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?
Re: Help | OnDialogResponse -
cmg4life - 29.01.2010
try to do
if( response ) { new message and other stuff } else if ( !response ) { bla this is the 2nd button }
Re: Help | OnDialogResponse -
Daniel13145 - 29.01.2010
nvm i success to get solution. :] but thanks anyway