Police lights turn off all the time
#5

here is what I use..
can be set for any veh param but here it is

pawn Код:
enum eVehicleParams: {
    engine = 0,
    lights = 1,
    alarm = 2,
    doors = 3,
    bonnet = 4,
    boot = 5,
    objective = 6
}

stock ToggleVehicleParamsEx(vehicleid,eVehicleParams:type,bool:enable)
{
    new iengine, ilights, ialarm, idoors, ibonnet, iboot, iobjective;
    GetVehicleParamsEx(vehicleid, iengine, ilights, ialarm, idoors, ibonnet, iboot, iobjective);
    switch(type)
    {
        case 0:{SetVehicleParamsEx(vehicleid, enable, ilights, ialarm, idoors, ibonnet, iboot, iobjective);}
        case 1:{SetVehicleParamsEx(vehicleid, iengine, enable, ialarm, idoors, ibonnet, iboot, iobjective);}
        case 2:{SetVehicleParamsEx(vehicleid, iengine, ilights, enable, idoors, ibonnet, iboot, iobjective);}
        case 3:{SetVehicleParamsEx(vehicleid, iengine, ilights, ialarm, enable, ibonnet, iboot, iobjective);}
        case 4:{SetVehicleParamsEx(vehicleid, iengine, ilights, ialarm, idoors, enable, iboot, iobjective);}
        case 5:{SetVehicleParamsEx(vehicleid, iengine, ilights, ialarm, idoors, ibonnet, enable, iobjective);}
        case 6:{SetVehicleParamsEx(vehicleid, iengine, ilights, ialarm, idoors, ibonnet, iboot, enable);}
    }
    return 1;
}
usage: for the doors,
pawn Код:
ToggleVehicleParamsEx(vehicleid,3,0);  // unlocks doors
    ToggleVehicleParamsEx(vehicleid,3,1); //locks doors
Reply


Messages In This Thread
Police lights turn off all the time - by Gerira Gaijin - 19.02.2012, 18:57
Re: Police lights turn off all the time - by Madd Kat - 19.02.2012, 19:00
Re: Police lights turn off all the time - by Gerira Gaijin - 19.02.2012, 20:04
Re: Police lights turn off all the time - by milanosie - 19.02.2012, 20:11
Re: Police lights turn off all the time - by Madd Kat - 19.02.2012, 20:13

Forum Jump:


Users browsing this thread: 2 Guest(s)