Jump to content

Lights Off When Enter Vehicle


DarkLink

Recommended Posts

I want to put lights always off when entering a vehicle that has the engine off.. was working before, but not anymore :S

  
function setLights () 
     
    if ( (getVehicleEngineState ( source ) ) == false ) then 
        setVehicleOverrideLights ( source, 1 ) 
         
         
    end 
end 
addEventHandler("onVehicleEnter", getRootElement(), setLights) 
  

I hope u guys can help :/

thanks anyway

EDIT: FIXED, Changed from onVehicleEnter to onVehicleStartEnter and it works now .

Thanks anyway. u can close.

Link to comment

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...