- Documentation
- Server functions
- setTrafficLightState
Function
setTrafficLightState
Stores the state of the traffic lights at junctions (0-9).
Syntax
bool setTrafficLightState(int value)Arguments
valueint- State 0-9 (e.g. 0 automatic, 1-4 colour combinations, 9 off).
Returns
true on success.
Example
setTrafficLightState(9)
Notes
State for scripts. Traffic lights in the game run on their own; the value is for script logic.