Quote:
Originally Posted by Mionee
Why do you guys recommend him to use switch while the if(dialogid == x) is correct aswell? The issue doesn't happen because of that.
This works, has been tested by me:
pawn Код:
#include <a_samp>
#define DIALOG_TELEPORT 1
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/tel", cmdtext, true, 10) == 0) { ShowPlayerDialog(playerid,DIALOG_TELEPORT,DIALOG_STYLE_LIST ,"Teleporter","LS Airport\nTall Building","Teleport","Cancel");
return 1; }
return 0; }
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOG_TELEPORT) { if(response) { switch(listitem) { case 0: return SetPlayerPos(playerid,1861.1454,-2491.4324,13.5547); case 1: return SetPlayerPos(playerid,1545.4745,-1362.4923,329.4586); } }
return 1; }
return 0; }
|
Thanks, but it didn't work either, I copied your code straight into pawn but same result. I can't think what it is as other mods I've downloaded work fine with menu's.