29.10.2013, 04:35
Do it how the pros do dialogs 

pawn Код:
#include <YSI\y_inline>
#include <YSI\y_dialog>
#include <YSI\y_commands>
CMD:testdialog(playerid, arg[])
{
inline ViewInfo(vpid, vdialogid, vresponse, vlistitem, string:vtext[])
{
#pragma unused vlistitem, vdialogid, vpid, vtext
if(vresponse)
{
inline ShowInfo(spid, sdialogid, sresponse, slistitem, string:stext[])
{
#pragma unused slistitem, sdialogid, spid, stext
if(sresponse) SendClientMessage(playerid, -1, "You closed the info box with ok!");
else SendClientMessage(playerid, -1, "You closed the info box with cancel!");
}
Dialog_ShowCallback(playerid, using inline ShowInfo, DIALOG_STYLE_MSGBOX, "Info", "This is a inline dialog", "Ok", "Close");
}
else SendClientMessage(playerid, -1, "You chose not to see the info box!");
}
Dialog_ShowCallback(playerid, using inline ViewInfo, DIALOG_STYLE_MSGBOX, "Show info?", "Info", "Show", "Close");
return 1;
}