OnGameModeInit
cef_subscribe("callback_dialog_response", "CallbackDialogResponse");
stock cefdialog(playerid, dialogId, dialogType, dHeader[], dText[], button_1[], button_2[]) {
cef_emit_event(playerid, "show_dialog", CEFINT(dialogId), CEFINT(dialogType), CEFSTR(dHeader), CEFSTR(dText), CEFSTR(button_1), CEFSTR(button_2));
return 1;
}
stock Dialog(playerid, dialogid, style, caption[], info[], button1[], button2[])
{
if(style == DIALOG_STYLE_LIST ||
style == DIALOG_STYLE_INPUT ||
style == DIALOG_STYLE_PASSWORD ||
style == DIALOG_STYLE_MSGBOX ||
style == 5) return cefdialog(playerid, dialogid, style, caption, info, button1, button2);
else return ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);
}
stock ShowPlayerDialogEx(playerid, dialogid, style, caption[], info[], button1[], button2[])
{
Dialog(playerid, dialogid, style, caption, info, button1, button2);
SetPVarInt(playerid, "USEDIALOGID", dialogid);
return 1;
}