15.05.2010, 21:27
hi so iv made a dialog to spawn cars the dialog shows and everything seems ok but when i make a selection nothing happens here is the code.
i have the ShowPlayerDialog in a command in my scipt
, there are no errors i just dont know y its not working. i also used a switch but that didn't work either. any help much appreciated thanks all
Code:
ShowPlayerDialog(playerid,carlist,DIALOG_STYLE_LIST,"Choose A Vehicle","Rancher\nNrg","Buy","No Thanks");//inside a command
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new Float:x, Float:y, Float:z,Float:ang;
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid,ang);
if(dialogid == carlist && response)
{
if(listitem == 0)
{
Pcar[playerid] = CreateVehicle(495,x,y,z,ang,-1,-1,0);
PutPlayerInVehicle(playerid,Pcar[playerid],0);
return 1;
}
else
{
Pcar[playerid] = CreateVehicle(522,x+3.0,y,z,ang,-1,-1,0);
PutPlayerInVehicle(playerid,Pcar[playerid],0);
return 1;
}
}
return 1;
}
, there are no errors i just dont know y its not working. i also used a switch but that didn't work either. any help much appreciated thanks all

