90% Of My Dialog Not Work..
#1

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.

how can i fix it?;O?
if you need an example dialog, message here to me
Reply
#2

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.
Reply
#3

Guys.. i have it.
Really, i can give code's of u want..
Reply
#4

PHP код:
public OnPlayerCommandText(playeridcmdtext[]) {
    if(
strcmp(cmdtext"/tunecar"true) == 0) {
        new 
playerstate GetPlayerState(playerid);
        if(
playerstate == PLAYER_STATE_DRIVER) {
            return 
ModCar(playerid);
        }
        else {
           return 
SendClientMessage(playeridCOLOR_RED"[ERROR]: You must be in a car being the driver.");
        }
    }
    return 
0;

Dialog + Case's

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == DIALOGID)
    {
        if(
response)
        {
            if(
listitem == 0//Paintjobs
            
{
                
ShowPlayerDialog(playerid455DIALOG_STYLE_LIST"Select a Paintjob""Paint Job 1\nPaint Job 2\nPaint Job 3\nBACK""Select""Exit");
            }
            if(
listitem == 1//Colors
            
{
                
ShowPlayerDialog(playerid4556DIALOG_STYLE_LIST"Select a Color""Black\nWhite\nRed\nBlue\nGreen\nYellow\nPink\nBrown\nBACK""Select""Exit");
            }
            if(
listitem == 2//Exhausts
            
{
                
ShowPlayerDialog(playerid4558DIALOG_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(playerid4559DIALOG_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(playerid45511DIALOG_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(playerid12312DIALOG_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(playerid555513DIALOG_STYLE_LIST"Select a Spoiler""Alien Spoiler\nX-Flow Spoiler\nBACK""Select""Exit");
            }
            if(
listitem == 7//SideSkirts
            
{
                
ShowPlayerDialog(playerid32131231DIALOG_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(playerid312319DIALOG_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(playerid1231231DIALOG_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(playerid31231DIALOG_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(playerid11123212DIALOG_STYLE_LIST"Tune car menu""Hydraulics\nNitro x10\nRepair Car\nBACK""Select""Exit");
            }
            if(
listitem == 12//Wheels2
            
{
                
ShowPlayerDialog(playerid1412412DIALOG_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(playerid11330.00.00.0);
                    
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added paintjob number 1 to the car.");
                    
ShowPlayerDialog(playeridDIALOGID+1DIALOG_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(playeridDIALOGIDDIALOG_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(playerid11330.00.00.0);
                    
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added paintjob number 2 to the car.");
                    
ShowPlayerDialog(playeridDIALOGID+1DIALOG_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(playeridDIALOGIDDIALOG_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(playerid11330.00.00.0);
                   
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added paintjob number 3 to the car.");
                   
ShowPlayerDialog(playeridDIALOGID+1DIALOG_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(playeridDIALOGIDDIALOG_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(playeridDIALOGIDDIALOG_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(playerid11330.00.00.0);
                    
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You painted your car to black.");
                    
ShowPlayerDialog(playeridDIALOGID+2DIALOG_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(playerid11330.00.00.0);
                    
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You painted your car to white.");
                    
ShowPlayerDialog(playeridDIALOGID+2DIALOG_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(playerid11330.00.00.0);
                    
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You painted your car to red.");
                    
ShowPlayerDialog(playeridDIALOGID+2DIALOG_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(playerid11330.00.00.0);
                    
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You painted your car to blue.");
                    
ShowPlayerDialog(playeridDIALOGID+2DIALOG_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(playerid11330.00.00.0);
                    
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You painted your car to green.");
                    
ShowPlayerDialog(playeridDIALOGID+2DIALOG_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(playerid11330.00.00.0);
                    
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You painted your car to yellow.");
                    
ShowPlayerDialog(playeridDIALOGID+2DIALOG_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(playerid11330.00.00.0);
                    
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You painted your car to pink.");
                    
ShowPlayerDialog(playeridDIALOGID+2DIALOG_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(playerid11330.00.00.0);
                      
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You painted your car to brown.");
                    
ShowPlayerDialog(playeridDIALOGID+2DIALOG_STYLE_LIST"Select a Color""Black\nWhite\nRed\nBlue\nGreen\nYellow\nPink\nBrown\nBACK""Select""Exit");
            }
            if(
listitem == 8)
            {
                    
ShowPlayerDialog(playeridDIALOGIDDIALOG_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(playerid11330.00.00.0);
                        
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added Wheel Arch Alien Exhaust component on Elegy.");
                        
ShowPlayerDialog(playeridDIALOGID+3DIALOG_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(playerid11330.00.00.0);
                        
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added Wheel Arch Alien Exhaust component on Flash.");
                        
ShowPlayerDialog(playeridDIALOGID+3DIALOG_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(playerid11330.00.00.0);
                        
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added Wheel Arch Alien Exhaust component on Jetser.");
                        
ShowPlayerDialog(playeridDIALOGID+3DIALOG_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(playerid11330.00.00.0);
                        
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added Wheel Arch Alien Exhaust component on Stratum.");
                        
ShowPlayerDialog(playeridDIALOGID+3DIALOG_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(playerid11330.00.00.0);
                        
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added Wheel Arch Alien Exhaust component on Sultan.");
                        
ShowPlayerDialog(playeridDIALOGID+3DIALOG_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(playerid11330.00.00.0);
                         
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added Wheel Arch Alien Exhaust component on Uranus.");
                        
ShowPlayerDialog(playeridDIALOGID+3DIALOG_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(playeridDIALOGIDDIALOG_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(playerid11330.00.00.0);
                        
SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: You have succesfully added Wheel Arch X-Flow Exhaust component on Elegy.");
                        
ShowPlayerDialog(playeridDIALOGID+3DIALOG_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"); 
Reply
#5

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.
Reply
#6

am.. i got like 1000 lines about the case .. and the list items...
how can i give u it..?
Reply
#7

here is a pastebin of the mod.
http://pastebin.com/mte0tjai
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)