90% Of My Dialog Not Work.. -
Hey..
i Got Some Dialogs i create.
when i use command, its show the dialog.
but when i choose something of the list on dialog, its just quit from dialog.
Re: 90% Of My Dialog Not Work.. -
You need to add code in OnDialogReponse callback about if a player responses or not to that dialogid. If you have some code and you press but nothing happens, in OnDialogResponse callback, return false if it's filterscript, otherwise if it's not and it's a gamemode, return true.
Re: 90% Of My Dialog Not Work.. -
Guys.. i have it.
Re: 90% Of My Dialog Not Work.. -
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOGID)
{
if(response)
{
if(listitem == 0) //Paintjobs
{
ShowPlayerDialog(playerid, 455, DIALOG_STYLE_LIST, "Select a Paintjob", "Paint Job 1\nPaint Job 2\nPaint Job 3\nBACK", "Select", "Exit");
}
if(listitem == 1) //Colors
{
ShowPlayerDialog(playerid, 4556, DIALOG_STYLE_LIST, "Select a Color", "Black\nWhite\nRed\nBlue\nGreen\nYellow\nPink\nBrown\nBACK", "Select", "Exit");
}
if(listitem == 2) //Exhausts
{
ShowPlayerDialog(playerid, 4558, DIALOG_STYLE_LIST, "Select a Exhaust", "Wheel Arch Alien Exhaust\nWheel Arch X-Flow Exhaust\nLocos Low Chromer Exhaust\nLocos Low Slamin Exhaust\nBACK", "Select", "Exit");
}
if(listitem == 3) //Front Bumpers
{
ShowPlayerDialog(playerid, 4559, DIALOG_STYLE_LIST, "Select a Front Bumper", "Wheel Arch Alien bumper\nWheel Arch X-Flow bumper\nLocos Low Chromer bumper\nLocos Low Slamin bumper\nBACK", "Select", "Exit");
}
if(listitem == 4) //Rear Bumpers
{
ShowPlayerDialog(playerid, 45511, DIALOG_STYLE_LIST, "Select a Rear Bumper", "Wheel Arch Alien bumper\nWheel Arch X-Flow bumper\nLocos Low Chromer bumper\nLocos Low Slamin bumper\nBACK", "Select", "Exit");
}
if(listitem == 5) //Roofs
{
ShowPlayerDialog(playerid, 12312, DIALOG_STYLE_LIST, "Select a Roof", "Wheel Arch Alien Roof Vent\nWheel Arch X-Flow Roof Vent\nLocos Low Hardtop Roof\nLocos Low Softtop Roof\nBACK", "Select", "Exit");
}
if(listitem == 6) //Spoilers
{
ShowPlayerDialog(playerid, 555513, DIALOG_STYLE_LIST, "Select a Spoiler", "Alien Spoiler\nX-Flow Spoiler\nBACK", "Select", "Exit");
}
if(listitem == 7) //SideSkirts
{
ShowPlayerDialog(playerid, 32131231, DIALOG_STYLE_LIST, "Select a SideSkirt", "Wheel Arch Alien Side Skirts\nWheel Arch X-Flow Side Skirts\nLocos Low Chrome Strip\nLocos Low Chrome Flames\nLocos Low Chrome Arches\nLocos Low Chrome Trim\nLocos Low Wheelcovers\nBACK", "Select", "Exit");
}
if(listitem == 8) //Bullbars
{
ShowPlayerDialog(playerid, 312319, DIALOG_STYLE_LIST, "Select a Bullbar", "Locos Low Chrome Grill\nLocos Low Chrome Bars\nLocos Low Chrome Lights\nLocos Low Chrome Bullbar\nBACK", "Select", "Exit");
}
if(listitem == 9) //Wheels
{
ShowPlayerDialog(playerid, 1231231, DIALOG_STYLE_LIST, "Select a Wheel type", "Offroad\nMega\nWires\nTwist\nGrove\nImport\nAtomic\nAhab\nVirtual\nAccess\nNext Page\nBACK", "Select", "Exit");
}
if(listitem == 10) //Car stereo
{
ShowPlayerDialog(playerid, 31231, DIALOG_STYLE_LIST, "Select a Car Stereo.", "Bass Boost\nSuper Bass Boost\nUltra Bass Boost\nKing Bass Boost\nBACK", "Select", "Exit");
}
if(listitem == 11) //Tune car menu 2
{
ShowPlayerDialog(playerid, 11123212, DIALOG_STYLE_LIST, "Tune car menu", "Hydraulics\nNitro x10\nRepair Car\nBACK", "Select", "Exit");
}
if(listitem == 12) //Wheels2
{
ShowPlayerDialog(playerid, 1412412, DIALOG_STYLE_LIST, "Select a Wheel type", "Trance\nShadow\nRimshine\nClassic\nCutter\nSwitch\nDollar\nBACK", "Select", "Exit");
}
}
}
if(dialogid == DIALOGID+1) //Paintjobs
{
if(response)
{
if(listitem == 0)
{
if(pmodelid[playerid] == 562 ||
pmodelid[playerid] == 565 ||
pmodelid[playerid] == 559 ||
pmodelid[playerid] == 561 ||
pmodelid[playerid] == 560 ||
pmodelid[playerid] == 575 ||
pmodelid[playerid] == 534 ||
pmodelid[playerid] == 567 ||
pmodelid[playerid] == 536 ||
pmodelid[playerid] == 535 ||
pmodelid[playerid] == 576 ||
pmodelid[playerid] == 558)
{
new car = GetPlayerVehicleID(playerid);
ChangeVehiclePaintjob(car,0);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added paintjob number 1 to the car.");
ShowPlayerDialog(playerid, DIALOGID+1, DIALOG_STYLE_LIST, "Select a Paintjob", "Paint Job 1\nPaint Job 2\nPaint Job 3\nBACK", "Select", "Exit");
}
else
{
SendClientMessage(playerid,COLOR_RED,"[ERROR]: Paintjob is only for Wheel Arch Angel and Loco Low Co. types of cars!");
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Tune car menu","Paint Jobs\nColors\nExhausts\nFront Bumper\nRear Bumper\nRoof\nSpoilers\nSide Skirts\nBullbars\nWheels\nCar Stereo\nNext page", "Select", "Exit");
}
}
if(listitem == 1)
{
if(pmodelid[playerid] == 562 ||
pmodelid[playerid] == 565 ||
pmodelid[playerid] == 559 ||
pmodelid[playerid] == 561 ||
pmodelid[playerid] == 560 ||
pmodelid[playerid] == 575 ||
pmodelid[playerid] == 534 ||
pmodelid[playerid] == 567 ||
pmodelid[playerid] == 536 ||
pmodelid[playerid] == 535 ||
pmodelid[playerid] == 576 ||
pmodelid[playerid] == 558)
{
new car = GetPlayerVehicleID(playerid);
ChangeVehiclePaintjob(car,1);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added paintjob number 2 to the car.");
ShowPlayerDialog(playerid, DIALOGID+1, DIALOG_STYLE_LIST, "Select a Paintjob", "Paint Job 1\nPaint Job 2\nPaint Job 3\nBACK", "Select", "Exit");
}
else
{
SendClientMessage(playerid,COLOR_RED,"[ERROR]: Paintjob is only for Wheel Arch Angel and Loco Low Co. types of cars!");
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Tune car menu","Paint Jobs\nColors\nExhausts\nFront Bumper\nRear Bumper\nRoof\nSpoilers\nSide Skirts\nBullbars\nWheels\nCar Stereo\nNext page", "Select", "Exit");
}
}
if(listitem == 2)
{
if(pmodelid[playerid] == 562 ||
pmodelid[playerid] == 565 ||
pmodelid[playerid] == 559 ||
pmodelid[playerid] == 561 ||
pmodelid[playerid] == 560 ||
pmodelid[playerid] == 575 ||
pmodelid[playerid] == 534 ||
pmodelid[playerid] == 567 ||
pmodelid[playerid] == 536 ||
pmodelid[playerid] == 535 ||
pmodelid[playerid] == 576 ||
pmodelid[playerid] == 558)
{
new car = GetPlayerVehicleID(playerid);
ChangeVehiclePaintjob(car,2);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added paintjob number 3 to the car.");
ShowPlayerDialog(playerid, DIALOGID+1, DIALOG_STYLE_LIST, "Select a Paintjob", "Paint Job 1\nPaint Job 2\nPaint Job 3\nBACK", "Select", "Exit");
}
else
{
SendClientMessage(playerid,COLOR_RED,"[ERROR]: Paintjob is only for Wheel Arch Angel and Loco Low Co. types of cars!");
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Tune car menu","Paint Jobs\nColors\nExhausts\nFront Bumper\nRear Bumper\nRoof\nSpoilers\nSide Skirts\nBullbars\nWheels\nCar Stereo\nNext page", "Select", "Exit");
}
}
if(listitem == 3)
{
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Tune car menu","Paint Jobs\nColors\nExhausts\nFront Bumper\nRear Bumper\nRoof\nSpoilers\nSide Skirts\nBullbars\nWheels\nCar Stereo\nNext page", "Select", "Exit");
}
}
}
if(dialogid == DIALOGID+2) //Colours
{
if(response)
{
if(listitem == 0)
{
new car = GetPlayerVehicleID(playerid);
ChangeVehicleColor(car,0,0);//Black
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You painted your car to black.");
ShowPlayerDialog(playerid, DIALOGID+2, DIALOG_STYLE_LIST, "Select a Color", "Black\nWhite\nRed\nBlue\nGreen\nYellow\nPink\nBrown\nBACK", "Select", "Exit");
}
if(listitem == 1)
{
new car = GetPlayerVehicleID(playerid);
ChangeVehicleColor(car,1,1);//White
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You painted your car to white.");
ShowPlayerDialog(playerid, DIALOGID+2, DIALOG_STYLE_LIST, "Select a Color", "Black\nWhite\nRed\nBlue\nGreen\nYellow\nPink\nBrown\nBACK", "Select", "Exit");
}
if(listitem == 2)
{
new car = GetPlayerVehicleID(playerid);
ChangeVehicleColor(car,3,3);//Red
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You painted your car to red.");
ShowPlayerDialog(playerid, DIALOGID+2, DIALOG_STYLE_LIST, "Select a Color", "Black\nWhite\nRed\nBlue\nGreen\nYellow\nPink\nBrown\nBACK", "Select", "Exit");
}
if(listitem == 3)
{
new car = GetPlayerVehicleID(playerid);
ChangeVehicleColor(car,79,79); //Blue
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You painted your car to blue.");
ShowPlayerDialog(playerid, DIALOGID+2, DIALOG_STYLE_LIST, "Select a Color", "Black\nWhite\nRed\nBlue\nGreen\nYellow\nPink\nBrown\nBACK", "Select", "Exit");
}
if(listitem == 4)
{
new car = GetPlayerVehicleID(playerid);
ChangeVehicleColor(car,86,86);//Green
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You painted your car to green.");
ShowPlayerDialog(playerid, DIALOGID+2, DIALOG_STYLE_LIST, "Select a Color", "Black\nWhite\nRed\nBlue\nGreen\nYellow\nPink\nBrown\nBACK", "Select", "Exit");
}
if(listitem == 5)
{
new car = GetPlayerVehicleID(playerid);
ChangeVehicleColor(car,6,6);//Yellow
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You painted your car to yellow.");
ShowPlayerDialog(playerid, DIALOGID+2, DIALOG_STYLE_LIST, "Select a Color", "Black\nWhite\nRed\nBlue\nGreen\nYellow\nPink\nBrown\nBACK", "Select", "Exit");
}
if(listitem == 6)
{
new car = GetPlayerVehicleID(playerid);
ChangeVehicleColor(car,126,126);//Pink
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You painted your car to pink.");
ShowPlayerDialog(playerid, DIALOGID+2, DIALOG_STYLE_LIST, "Select a Color", "Black\nWhite\nRed\nBlue\nGreen\nYellow\nPink\nBrown\nBACK", "Select", "Exit");
}
if(listitem == 7)
{
new car = GetPlayerVehicleID(playerid);
ChangeVehicleColor(car,66,66);//Brown
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You painted your car to brown.");
ShowPlayerDialog(playerid, DIALOGID+2, DIALOG_STYLE_LIST, "Select a Color", "Black\nWhite\nRed\nBlue\nGreen\nYellow\nPink\nBrown\nBACK", "Select", "Exit");
}
if(listitem == 8)
{
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Tune car menu","Paint Jobs\nColors\nExhausts\nFront Bumper\nRear Bumper\nRoof\nSpoilers\nSide Skirts\nBullbars\nWheels\nCar Stereo\nNext page", "Select", "Exit");
}
}
}
if(dialogid == DIALOGID+3) //Exhausts
{
if(response)
{
if(listitem == 0)//Wheel Arch Cars Alien Exausts
{
if(pmodelid[playerid] == 562 ||
pmodelid[playerid] == 565 ||
pmodelid[playerid] == 559 ||
pmodelid[playerid] == 561 ||
pmodelid[playerid] == 560)
{
new car = GetPlayerVehicleID(playerid);
if(pmodelid[playerid] == 562)
{
AddVehicleComponent(car,1034);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added Wheel Arch Alien Exhaust component on Elegy.");
ShowPlayerDialog(playerid, DIALOGID+3, DIALOG_STYLE_LIST, "Select a Exhaust", "Wheel Arch Alien Exhaust\nWheel Arch X-Flow Exhaust\nLocos Low Chromer Exhaust\nLocos Low Slamin Exhaust\nBACK", "Select", "Exit");
}
else if(pmodelid[playerid] == 565)
{
AddVehicleComponent(car,1046);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added Wheel Arch Alien Exhaust component on Flash.");
ShowPlayerDialog(playerid, DIALOGID+3, DIALOG_STYLE_LIST, "Select a Exhaust", "Wheel Arch Alien Exhaust\nWheel Arch X-Flow Exhaust\nLocos Low Chromer Exhaust\nLocos Low Slamin Exhaust\nBACK", "Select", "Exit");
}
else if(pmodelid[playerid] == 559)
{
AddVehicleComponent(car,1065);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added Wheel Arch Alien Exhaust component on Jetser.");
ShowPlayerDialog(playerid, DIALOGID+3, DIALOG_STYLE_LIST, "Select a Exhaust", "Wheel Arch Alien Exhaust\nWheel Arch X-Flow Exhaust\nLocos Low Chromer Exhaust\nLocos Low Slamin Exhaust\nBACK", "Select", "Exit");
}
else if(pmodelid[playerid] == 561)
{
AddVehicleComponent(car,1064);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added Wheel Arch Alien Exhaust component on Stratum.");
ShowPlayerDialog(playerid, DIALOGID+3, DIALOG_STYLE_LIST, "Select a Exhaust", "Wheel Arch Alien Exhaust\nWheel Arch X-Flow Exhaust\nLocos Low Chromer Exhaust\nLocos Low Slamin Exhaust\nBACK", "Select", "Exit");
}
else if(pmodelid[playerid] == 560)
{
AddVehicleComponent(car,1028);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added Wheel Arch Alien Exhaust component on Sultan.");
ShowPlayerDialog(playerid, DIALOGID+3, DIALOG_STYLE_LIST, "Select a Exhaust", "Wheel Arch Alien Exhaust\nWheel Arch X-Flow Exhaust\nLocos Low Chromer Exhaust\nLocos Low Slamin Exhaust\nBACK", "Select", "Exit");
}
else if(pmodelid[playerid] == 558)
{
AddVehicleComponent(car,1089);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added Wheel Arch Alien Exhaust component on Uranus.");
ShowPlayerDialog(playerid, DIALOGID+3, DIALOG_STYLE_LIST, "Select a Exhaust", "Wheel Arch Alien Exhaust\nWheel Arch X-Flow Exhaust\nLocos Low Chromer Exhaust\nLocos Low Slamin Exhaust\nBACK", "Select", "Exit");
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"[ERROR]: You can only add this component to Wheel Arch Angels Car types!");
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Tune car menu","Paint Jobs\nColors\nExhausts\nFront Bumper\nRear Bumper\nRoof\nSpoilers\nSide Skirts\nBullbars\nWheels\nCar Stereo\nNext page", "Select", "Exit");
}
}
if(listitem == 1)//Wheel Arch Cars X-Flow Exausts
{
if(pmodelid[playerid] == 562 ||
pmodelid[playerid] == 565 ||
pmodelid[playerid] == 559 ||
pmodelid[playerid] == 561 ||
pmodelid[playerid] == 560)
{
new car = GetPlayerVehicleID(playerid);
if(pmodelid[playerid] == 562)
{
AddVehicleComponent(car,1037);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added Wheel Arch X-Flow Exhaust component on Elegy.");
ShowPlayerDialog(playerid, DIALOGID+3, DIALOG_STYLE_LIST, "Select a Exhaust", "Wheel Arch Alien Exhaust\nWheel Arch X-Flow Exhaust\nLocos Low Chromer Exhaust\nLocos Low Slamin Exhaust\nBACK", "Select", "Exit");
Re: 90% Of My Dialog Not Work.. -
Does ModCar(playerid) shows the DIALOGID? And what are you returning at the end of the callback?
Last, some dialogids are too large (Example: 11123212). Try to use lower.
Re: 90% Of My Dialog Not Work.. -
am.. i got like 1000 lines about the case .. and the list items...
Re: 90% Of My Dialog Not Work.. -
here is a pastebin of the mod.