SA-MP Forums Archive
Problem ManualVehicleEngineAndLights(); - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem ManualVehicleEngineAndLights(); (/showthread.php?tid=651591)



Problem ManualVehicleEngineAndLights(); - hoanduy - 23.03.2018

When I use ManualVehicleEngineAndLights (); All vehicles will turn off the engine and lights, including bicycles.
How can a bike move without turning off the engine?


Re: Problem ManualVehicleEngineAndLights(); - Kane - 23.03.2018

Simply turn the engine on if the vehicle is a bike model.

You can do it in OnVehicleSpawn or when it's created.


Re: Problem ManualVehicleEngineAndLights(); - hoanduy - 23.03.2018

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
Simply turn the engine on if the vehicle is a bike model.

You can do it in OnVehicleSpawn or when it's created.
Oh, I did not think of it, thank you


Re: Problem ManualVehicleEngineAndLights(); - PowerMwK - 23.03.2018

Try this
PHP код:
{
       new 
motlualarporcappormaob;
       
GetVehicleParamsEx(vehicleidmotlualarporcappormaob);
    
SetVehicleParamsEx(vehicleidVEHICLE_PARAMS_OFFlualarporcappormaob);

    if(
GetVehicleModel(vehicleid) == 510)
    {
        
SetVehicleParamsEx(vehicleidVEHICLE_PARAMS_ONlualarporcappormaob);
      }

    if(
GetVehicleModel(vehicleid) == 432){

        
SetVehicleHealth(vehicleid10000);
    }

    switch(
GetVehicleModel(vehicleid)){

        case 
433,427,490,528,599,601:
            
SetVehicleHealth(vehicleid4000);
    }