08.07.2013, 09:15
His example explains everything I believe.
This code
Becomes
This code
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if (dialogid == 1)
{
if (response)
{
SendClientMessageToAll(-1, inputtext);
}
else SendClientMessage(playerid, -1, "You've canceled the dialog.");
}
return 1;
}
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Announce", "Enter your message below.", "Announce", "Cancel");
pawn Код:
Dialog:Test(playerid, response, listitem, inputtext[])
{
if (response)
{
SendClientMessageToAll(-1, inputtext);
}
else SendClientMessage(playerid, -1, "You've canceled the dialog.");
return 1;
}
ShowDialog(playerid, Show:Test, DIALOG_STYLE_INPUT, "Announce", "Enter your message below.", "Announce", "Cancel");