ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setTrafficLightState

Function

setTrafficLightState

ServerWorldIdentical to MTA:SA

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.

See also