06.06.2013, 18:24
Hi all, I have made a little vehicle selection menu in my server. (learning the basics)
However when I use my dialog in-game it doesn't respond to any of the selections. Here's my codes:
However when I use my dialog in-game it doesn't respond to any of the selections. Here's my codes:
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/v", cmdtext, true, 10) == 0) { ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Voertuig kiezen", "Turismo\nBMX", "Spawnen", "Annuleren"); return 1; } return 0; }
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(response) { switch(dialogid) { case 2: { switch(listitem) { case 0: { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); CreateVehicle(451,x-3.0,y,z,0.0,1,1,-1); } case 1: { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid,X,Y,Z); CreateVehicle(481,X-3.0,Y,Z,0.0,1,1,-1); } } } } return 1; } return 0; }