Jump to content

Turning off the engine, but not the lights


Kaltsu

Recommended Posts

Posted

Hello,

I have noticed that when you are using setVehicleEngineState to turn the vehicle engine off, it automatically turns the lights off aswell.

Is there any way to turn off the engine, but still keep the vehicle lights on?

Posted

You spoke about it on IRC, so maybe you'll see some fix for it in the final release or maybe in dp3. Don't be surprised if it won't be fixed at all as I think it's the way GTA was made.

Posted
You spoke about it on IRC, so maybe you'll see some fix for it in the final release or maybe in dp3. Don't be surprised if it won't be fixed at all as I think it's the way GTA was made.

Actually it wasn't me. It was Clooak, my "colleague" as we work with the script development of the same server. :wink:

And Stevvo, I don't think it is possible because at the moment we have the light on/off switch set to "L" key, but it is not working while the engine is turned off.

  • 3 weeks later...
Posted

Turning lights off is actually desynced in the GTA, so I don't see a use of it, when only you can see the lights when you turn them on/off ...

Posted

Turning lights off is actually desynced in the GTA, so I don't see a use of it, when only you can see the lights when you turn them on/off ...

Posted
Turning lights off is actually desynced in the GTA, so I don't see a use of it, when only you can see the lights when you turn them on/off ...

It is synced unless set client side..

Posted
Turning lights off is actually desynced in the GTA, so I don't see a use of it, when only you can see the lights when you turn them on/off ...

It is synced unless set client side..

Posted

I think I have a solution for you. I use something similar to this with my vehicle parking script. Basically what you gotta do is something like this.

function shutMeOff ( thePlayer ) 
     vehicle = getPlayerOccupiedVehicle ( thePlayer ) 
     if ( vehicle ) then 
          setVehicleEngineState ( vehicle, false ) 
          setVehicleOverrideLights ( vehicle, 2 ) 
     else 
          outputChatBox ( "You need a vehicle stupid!", thePlayer, 255, 0, 0 ) 
     end 
end 
  
addCommandHandler ( "shutoff", shutMeOff ) 

just do the same essentially with the turning on, you only need to change a couple of values.

Posted

I think I have a solution for you. I use something similar to this with my vehicle parking script. Basically what you gotta do is something like this.

function shutMeOff ( thePlayer )     vehicle = getPlayerOccupiedVehicle ( thePlayer )     if ( vehicle ) then          setVehicleEngineState ( vehicle, false )          setVehicleOverrideLights ( vehicle, 2 )     else          outputChatBox ( "You need a vehicle stupid!", thePlayer, 255, 0, 0 )     endend addCommandHandler ( "shutoff", shutMeOff )

just do the same essentially with the turning on, you only need to change a couple of values.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...