22.08.2013, 11:33
pretty nice. But why not
Code:
new p_currentDialog[MAX_PLAYERS]; enum eDialogs { dRegistration, dLogin // ... unlimited ! (technically limited - 2147483647) }; stock showDialog(playerid, dialogid, type, head[], body[], left[], right[]) { p_currentDialog[playerid] = dialogid; ShowPlayerDialog(playerid, 0, type, head, body, left, right); } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { new const id = p_currentDialog[playerid]; p_currentDialog[playerid] = 0; switch( id ) { case dRegistration: { // do registration things } case dLogin: { // do login things } } return 0; }