Problem with SetVehicleParamsEx
#1

Hey,

I have never used SetVehicleParamsEx before, I have the engine, hood, boot, and alarm all working however the rest don't.

Am I doing this correctly:

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == Dialog_Settings)
    {
        if(!response) return SendClientMessage(playerid, COLOR_RED, "You have cancelled your selection.");
        new engine, lights, alarm, doors, bonnet, boot, objective;
        new VehicleID = GetPlayerVehicleID(playerid);
        switch(listitem)
        {
            case 0:
            {
                if(EngineOn[VehicleID] == false)
                {
                    SetVehicleParamsEx(VehicleID, true, lights, alarm, doors, bonnet, boot, objective);
                    EngineOn[VehicleID] = true;
                }
                else if(EngineOn[VehicleID] == true)
                {
                    SetVehicleParamsEx(VehicleID, false, lights, alarm, doors, bonnet, boot, objective);
                    EngineOn[VehicleID] = false;
                }
            }
            case 1:
            {
                if(LightsOn[VehicleID] == false)
                {
                    SetVehicleParamsEx(VehicleID, engine, true, alarm, doors, bonnet, boot, objective);
                    LightsOn[VehicleID] = true;
                }
                else if(LightsOn[VehicleID] == true)
                {
                    SetVehicleParamsEx(VehicleID, engine, false, alarm, doors, bonnet, boot, objective);
                    LightsOn[VehicleID] = false;
                }
            }
            case 2:
            {
                if(AlarmOn[VehicleID] == false)
                {
                    SetVehicleParamsEx(VehicleID, engine, lights, true, doors, bonnet, boot, objective);
                    AlarmOn[VehicleID] = true;
                }
                else if(AlarmOn[VehicleID] == true)
                {
                    SetVehicleParamsEx(VehicleID, engine, lights, false, doors, bonnet, boot, objective);
                    AlarmOn[VehicleID] = false;
                }
            }
            case 3:
            {
                if(DoorsOn[VehicleID] == false)
                {
                    SetVehicleParamsEx(VehicleID, engine, lights, alarm, true, bonnet, boot, objective);
                    DoorsOn[VehicleID] = true;
                }
                else if(DoorsOn[VehicleID] == true)
                {
                    SetVehicleParamsEx(VehicleID, engine, lights, alarm, false, bonnet, boot, objective);
                    DoorsOn[VehicleID] = false;
                }
            }
            case 4:
            {
                if(BonnetOn[VehicleID] == false)
                {
                    SetVehicleParamsEx(VehicleID, engine, lights, alarm, doors, true, boot, objective);
                    BonnetOn[VehicleID] = true;
                }
                else if(BonnetOn[VehicleID] == true)
                {
                    SetVehicleParamsEx(VehicleID, engine, lights, alarm, doors, false, boot, objective);
                    BonnetOn[VehicleID] = false;
                }
            }
            case 5:
            {
                if(BootOn[VehicleID] == false)
                {
                    SetVehicleParamsEx(VehicleID, engine, lights, alarm, doors, bonnet, true, objective);
                    BootOn[VehicleID] = true;
                }
                else if(BootOn[VehicleID] == true)
                {
                    SetVehicleParamsEx(VehicleID, engine, lights, alarm, doors, bonnet, false, objective);
                    BootOn[VehicleID] = false;
                }
            }
            case 6:
            {
                if(GodCar[playerid] == false)
                {
                    GodCar[playerid] = true;
                }
                else if(GodCar[playerid] == true)
                {
                    GodCar[playerid] = false;
                }
            }
        }
    }
    return 1;
}
Thanks in advance!
Reply


Messages In This Thread
Problem with SetVehicleParamsEx - by Snowman12 - 25.01.2012, 14:42
Re: Problem with SetVehicleParamsEx - by Konstantinos - 25.01.2012, 14:47
Re: Problem with SetVehicleParamsEx - by Snowman12 - 25.01.2012, 14:48
Re: Problem with SetVehicleParamsEx - by Konstantinos - 25.01.2012, 14:53
Re: Problem with SetVehicleParamsEx - by Snowman12 - 25.01.2012, 15:19
Re: Problem with SetVehicleParamsEx - by Snowman12 - 25.01.2012, 15:22
Re: Problem with SetVehicleParamsEx - by milanosie - 25.01.2012, 18:05

Forum Jump:


Users browsing this thread: 1 Guest(s)