Called before vehicles lights are toggled. Currently possible light types: running, fog, lowbeam, highbeam, hazards, blinkers_left, blinkers_right.
Used in: VCMod Main addon.
Shared GM:VC_canToggleLights(Entity ent, String ltype, Boolean on)
1. Entity ent; Vehicle
Vehicle whos lights are being toggled.
2. String ltype; Type
Light type that is being toggled.
3. Boolean on; Lights are on
Current state of this light type prior to toggling.
1. Boolean If it should allow it or not.
hook.Add("VC_canToggleLights", "VC_canToggleLights", function(ent, ltype, on) if ltype == "hazards" and !on then print("Vehicle :"..ent:VC_getName().." is attempting to shut down its hazard lights, lets not allow that.") local can = false return can end end)