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;
}
|
uhm no I have 1 other dialog with id 1 so that's not a problem
do i put showplayerdialog in OnDialogResponse? |