AreVehicleLightsOn: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
m (use note)
Line 3: Line 3:
{{New feature/item|3.0160|1.5.7|19626|This function is used to find out whether the lights of the vehicle are on.}}
{{New feature/item|3.0160|1.5.7|19626|This function is used to find out whether the lights of the vehicle are on.}}


Note that this is different to [[getVehicleOverrideLights]] in that this function will return '''true''' if the lights were turned on by natural causes: unless [[setVehicleOverrideLights]] is used, vehicles always automatically disable their lights between 06:00 and 07:00 and enable them between 20:00 and 21:00.
{{Note|
*This is different to [[getVehicleOverrideLights]] because this function will return '''true''' if the lights were turned on by natural causes.
* Unless [[setVehicleOverrideLights]] is used, vehicles always automatically disable their lights between 06:00 and 07:00 and enable them between 20:00 and 21:00.}}


==Syntax==
==Syntax==

Revision as of 12:46, 7 September 2019

This function is used to find out whether the lights of the vehicle are on.

[[{{{image}}}|link=|]] Note:
  • This is different to getVehicleOverrideLights because this function will return true if the lights were turned on by natural causes.
  • Unless setVehicleOverrideLights is used, vehicles always automatically disable their lights between 06:00 and 07:00 and enable them between 20:00 and 21:00.

Syntax

bool areVehicleLightsOn ( vehicle theVehicle )

OOP Syntax Help! I don't understand this!

Method: vehicle:areLightsOn(...)
Variable: .lightsOn


Required Arguments

  • theVehicle: the vehicle you wish to retrieve the lights state of.

Returns

Returns true if the lights are on, false otherwise.

Example

Accessories-text-editor.png Script Example Missing Function AreVehicleLightsOn needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.
-- TODO


See Also