Dialog isn't working, help would be very usefull. :)
#6

Make sure the dialog ID didn't messed with another dialog.
Debug your code and see if your OnDialogReponse called and your dialogid works.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    print("1");
    if(dialogid == DIALOG_CAR)
    {
        print("2");
        if(!response) return 1;
        new Vehicle,Engine,Lights,Alarm,Doors,Bonnet,Boot,Objective;
        Vehicle= GetPlayerVehicleID(playerid);
        if(listitem == 0)
        {
            if(Engine== 1) return SetVehicleParamsEx(Vehicle, 0, Lights, Alarm, Doors, Bonnet, Boot, Objective);
            if(Engine== 0) return SetVehicleParamsEx(Vehicle, 1, Lights, Alarm, Doors, Bonnet, Boot, Objective);
        }
        if(listitem == 1)
        {
            if(Lights== 1) return Lights = 0, SetVehicleParamsEx(Vehicle, Engine, Lights, Alarm, Doors, Bonnet, Boot, Objective);
            if(Lights== 0) return Lights = 1, SetVehicleParamsEx(Vehicle, Engine, Lights, Alarm, Doors, Bonnet, Boot, Objective);
        }
        if(listitem == 2)
        {
            if(Alarm== 1) return Alarm= 0, SetVehicleParamsEx(Vehicle, Engine, Lights, Alarm, Doors, Bonnet, Boot, Objective);
            if(Alarm== 0) return Alarm= 1, SetVehicleParamsEx(Vehicle, Engine, Lights, Alarm, Doors, Bonnet, Boot, Objective);
        }
        if(listitem == 3)
        {
            if(Bonnet== 1) return Bonnet= 0, SetVehicleParamsEx(Vehicle, Engine, Lights, Alarm, Doors, Bonnet, Boot, Objective);
            if(Bonnet== 0) return Bonnet= 1, SetVehicleParamsEx(Vehicle, Engine, Lights, Alarm, Doors, Bonnet, Boot, Objective);
        }
        if(listitem == 4)
        {
            if(Boot== 1) return Boot= 0, SetVehicleParamsEx(Vehicle, Engine, Lights, Alarm, Doors, Bonnet, Boot, Objective);
            if(Boot== 0) return Boot= 1, SetVehicleParamsEx(Vehicle, Engine, Lights, Alarm, Doors, Bonnet, Boot, Objective);
        }
        return 1;
    }
    return 0;
}
I suggest you yo use switch statement.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)