27.04.2012, 15:50
I am unable to choose one of the vehicle options...it does the same as it would if I were to press cancel
Код:
public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[]) { new Float:Pos[4]={-1969.3022, 309.2212, 34.9013}, ivModel, ivPrice, ivColors[2]; if(dialogid == DIALOG_CARBUY&& Total_Player_Vehicles[playerid]<= MAX_OWNABLE_VEH&& Total_Veh_Created < MAX_BUYABLE_VEH) { if(!response){ShowPlayerDialog(playerid, -1, DIALOG_STYLE_LIST, "", "", "", "");} else { switch(listitem) { case 0: { ivModel = VEH1; } case 1: { ivModel = VEH2; } case 2: { ivModel = VEH3; } case 3: { ivModel = VEH4; } } } }
Код:
public OnPlayerEnterDynamicCP(playerid,checkpointid) { if(checkpointid == CP_CARBUY) { ShowPlayerDialog(playerid,DIALOG_CARBUY,DIALOG_STYLE_LIST,"Ottos Vehicle Dealership","Infernus($1,000,000)\nSuper GT($1,200,000)\nUranus($700,000)\nNRG-500($900,000)","Buy","Cancel"); } }