07.12.2010, 14:55
This is my code:
i wanna do a dialog with the command /help, there you get explained all command, and then if click accept there you will get a dropbox to select what command you want, also the function OnDialogResponse, i dont get it work
Quote:
#define D_Help 2 public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/help", cmdtext, true, 10) == 0) { ShowPlayerDialogHelpCommand(playerid); return 1; } return 0; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch(D_Help) { case 1: { if(!response) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "You cancelled."); return 1; } switch(listitem) { case 0: // Listitems start with 0, not 1 { SendClientMessage(playerid, COLOR_LIGHTBLUE, "ROFLED"); return 1; } case 1: { } case 2: { } } } } return 0; } ShowPlayerDialogHelpCommand(playerid) { ShowPlayerDialog(playerid, D_Help, DIALOG_STYLE_MSGBOX, "Help Box", "Here we gonna show you some basic command for the server.\n/command\n/command", "Accept", "Cancel"); return 1; } |