01.04.2010, 12:52
Hello!
I want to add another dialog, but If I do, it ends up with many errors.
I read from samp wiki that I have to use somekind of switch, but It wasnt explained there.
So how to?
Regards,
Assyria
Код:
if (strcmp("/test", cmdtext, true, 10) == 0) { ShowPlayerDialog(playerid, 157, DIALOG_STYLE_LIST, "Service", "pah \npoh \npih", "Select", "Cancel"); return 1; }
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 157 && response) { switch(listitem) { case 0: { SendClientMessage(playerid,0xAA000AA,"text"); } case 1: { SendClientMessage(playerid,0xAA000AA,"text"); } case 2: { SendClientMessage(playerid,0xAA000AA,"text"); } } } return 1; }
I read from samp wiki that I have to use somekind of switch, but It wasnt explained there.
So how to?
Regards,
Assyria