25.07.2014, 07:56
Can someone give me an example to make this: DIALOG_STYLE_LIST, i'd like to make like a help dialog with a selection.
Can someone give me an example pls
Can someone give me an example pls
#define DIALOG_SEX
public OnPlayerConnect(playerid) {
ShowPlayerDialog(playerid, DIALOG_SEX, DIALOG_STYLE_LIST, "Would you like to be a Male or Female?", "Male\nFemale");
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
switch(dialogid) {
case DIALOG_SEX:
{
switch(listitem) {
case 0: { // 1st option
SendClientMessage(playerid, -1, "You chose: MALE!");
}
case 1: { // 2nd option
SendClientMessage(playerid, -1, "You chose: FEMALE!");
}
}
}
}
return true;
}
if(dialogid == DIALOG_SEX) {
if(listitem == 0) {
}
}