Heres my vehicle dialog from my blank gamemode I made.
pawn Код:
if(dialogid == DIALOG_VEHICLES)
{
new Float:x,Float:y,Float:z;
if(response == 1)// They pressed the first button.
{
switch(listitem)// Checking which listitem was selected
{
case 0:// Elegy - First item in the Dialog
{
GetPlayerPos(playerid,x,y,z);
CreateVehicle(562,x+3.0,y,z,0,-1,-1,5);
}
case 1: //Sultan - Second Item in the Dialog
{
GetPlayerPos(playerid,x,y,z);
CreateVehicle(560,x+3.0,y,z,0,-1,-1,5);
}
case 2://Infernus - Third Item in the Dialog
{
GetPlayerPos(playerid,x,y,z);
CreateVehicle(411,x+3.0,y,z,0,-1,-1,5);
}
case 3://Turismo - Fourth Item in the Dialog
{
GetPlayerPos(playerid,x,y,z);
CreateVehicle(451,x+3.0,y,z,0,-1,-1,5);
}
case 4://Hotring - Fifth Item in the Dialog
{
GetPlayerPos(playerid,x,y,z);
CreateVehicle(494,x+3.0,y,z,0,-1,-1,5);
}
case 5://Hotring A - Sixth Item in the Dialog
{
GetPlayerPos(playerid,x,y,z);
CreateVehicle(502,x+3.0,y,z,0,-1,-1,5);
}
case 6://Hotring B - Seventh Item in the Dialog
{
GetPlayerPos(playerid,x,y,z);
CreateVehicle(503,x+3.0,y,z,0,-1,-1,5);
}
case 7://NRG - Eigth Item in the Dialog
{
GetPlayerPos(playerid,x,y,z);
CreateVehicle(522,x+3.0,y,z,0,-1,-1,5);
}
}
}
}