03.07.2014, 18:03
I'm new to pawn scripting, and I've put together this menu to combine my teleporting positions. The menu appears but when I choose something nothing happens. I've taken working code from other similar mods and my code still doesn't work. It's probably something simple, can anyone see what I've done wrong?
My code:
My code:
Код:
#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: SetPlayerPos(playerid,1861.1454,-2491.4324,13.5547); case 1: SetPlayerPos(playerid,1545.4745,-1362.4923,329.4586); } } return 1; } return 0; }