05.12.2018, 12:29
So i have this on OnDialogResponse, the thing is that i've made a command to introduce jobs informations, so when i chose the listitem jobs, the dialog is closing and nothing is happening. here's the code
Top of the code with dialogs id's
The /help command with the listitem 'Jobs'
Then the ondialogresponse code
Top of the code with dialogs id's
Код:
#define DIALOG_CMD_HELP 3 #define DIALOG_CMD_HELP2 4 #define DIALOG_CMD_HELP3 5 #define DIALOG_CMD_HELP4 6
Код:
CMD:help(playerid, params[]) { ShowPlayerDialog(playerid, DIALOG_CMD_HELP, DIALOG_STYLE_LIST, "Help sistem", "Jobs", "Next", "Cancel"); return 1; }
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch(dialogid) { case DIALOG_CMD_HELP: { if(response || listitem == 0) { if(PlayerStatus[playerid][pJob] == 0) ShowPlayerDialog(playerid, DIALOG_CMD_HELP2, DIALOG_STYLE_MSGBOX, "", "{DEDEDE}Momentan nu detii nici un job.\nFoloseste {FFE2A3}/jobs {DEDEDE}pentru a merge sa te angajezi.", "Ok",""); else if(PlayerJob[playerid][pFisher] == 1) ShowPlayerDialog(playerid, DIALOG_CMD_HELP3, DIALOG_STYLE_MSGBOX, "", "{FFE2A3}Comenzi disponibile:\n{FFE2A3}/fish {DEDEDE}» Folosita pentru a pescui in zona corespunzatoare\n{FFE2A3}/sellfish {DEDEDE}» Folosita pentru a vine pestele intr-un businesss tip '24/7', \n{FFE2A3}/quitjob {DEDEDE}» Folosita pentru a renunta la jobul actual", "Ok", ""); else if(PlayerJob[playerid][pTrucker] == 1) ShowPlayerDialog(playerid, DIALOG_CMD_HELP4, DIALOG_STYLE_MSGBOX, "", "{FFE2A3}/jobs {DEDEDE}» Foloseste aceasta comanda pentru a selecta jobul 'Trucker' si pentru a ajunge cu ajutorul unu checkpoint la actorul langa care trebuie sa apesi tasta 'Enter'\n{FFE2A3}/quitjob {DEDEDE}» Folosita pentru a renunta la jobul actual", "Ok", ""); } }