19.03.2013, 19:46
Oh you want dialog response too
ok
NOTE:This is used from my gamemode,you see after if(listitem == 6 then show playerdialog? well them need their own defines aswell
eg:
ok
PHP код:
if (dialogid == DIALOG_NEW) //==Commands==//
{
if(response) //means if they clicked left button
{
if(listitem == 0) //==Help==//
{
ShowPlayerDialog(playerid, DIALOG_HELP23, DIALOG_STYLE_LIST, "*** Help ***", "/report\n/requesthelp\n/newb(ie)\n/tognewbie", "Okay", " ");
}
if(listitem == 1) //==Account==//
{
ShowPlayerDialog(playerid, DIALOG_HELP24, DIALOG_STYLE_LIST, "*** Account ***", "/rules\n/faq\n/stats\n/inventory\n/myguns\n/buylevel\n/upgrade\n/changepass\n/killcheckpoint\n/resetupgrades(100k)", "Okay", " ");
}
if(listitem == 2) //==Chat==//
{
ShowPlayerDialog(playerid, DIALOG_HELP25, DIALOG_STYLE_LIST, "*** Chat ***", "/w(hisper)\n/o(oc)\n/s(hout)\n/l(ow)\n/b\n/ad(vertise)\n/f(amily)\n/me\n/togooc\n/tognews\n/togfam\n/togwhisper", "Okay", "");
}
if(listitem == 3) //==Bank==//
{
ShowPlayerDialog(playerid, DIALOG_HELP26, DIALOG_STYLE_LIST, "*** Bank ***", "/balance\n/withdraw\n/deposit\n/wiretransfer\n/abalance\n/awithdraw\n/adeposit\n/awiretransfer", "Okay", "");
}
if(listitem == 4) //==General(1)==//
{
ShowPlayerDialog(playerid, DIALOG_HELP27, DIALOG_STYLE_LIST, "*** General(1) ***", "/pay\n/writecheck\n/cashchecks\n/charity\n/time\n/buy\n/id\n/music\n/showlicenses\n/clothes\n/mywarrants", "Okay", "");
}
if(listitem == 5) //==General(2)==//
{
ShowPlayerDialog(playerid, DIALOG_HELP28, DIALOG_STYLE_LIST, "*** General(2) ***", "/lock\n/skill\n/stopani\n/do\n/me\n/kill\n/buyclothes\n/droplicense\n/calculate\n/refuel\n/car\n/seatbelt\n/checkbelt", "Okay", "");
}
if(listitem == 6) //==General(3)==//
{
ShowPlayerDialog(playerid, DIALOG_HELP29, DIALOG_STYLE_LIST, "*** General(3) ***", "/cancel\n/accept\n/eject\n/usepot\n/usecrack\n/contract\n/service\n/families\n/joinevent\n/checkweed", "Okay", "");
}
}
}
eg:
PHP код:
#define DIALOG_NEW 1
#define DIALOG_HELP23 2
#define DIALOG_HELP24 3
#define DIALOG_HELP25 4
#define DIALOG_HELP26 5
#define DIALOG_HELP27 6
#define DIALOG_HELP28 7
#define DIALOG_HELP29 8