Your way in handling dialogs
#1

Ok, i got about 50 - 60 dialogs in my script. I'm tired of keeping track of every dialog id, and sometimes my dialogs conflict one another.

So, what is your method in keeping control of dialogs, and not make them conflict against?

Thanks!
Reply
#2

Commenting each and every bracket, defining what it's opening and closing. And have a multi-line comment with each dialogid, then having text summarizing it.
Reply
#3

Use macros to keep track of your dialogues' IDs

pawn Код:
#define LOGIN_BOX                        (1)
Reply
#4

Define it all.

pawn Код:
#define DIALOG_HEYITSADIALOG (32767) // max dialog number

ShowPlayerDialog(playerid, DIALOG_HEYITSADIALOG, DIALOG_STYLE_MSGBOX,"hey","it's a dialog!","okey","gtfo");


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
          if(response) switch(dialogid) {
                    case DIALOG_HEYITSADIALOG: { <do your thang> }
          }
          return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)