SetTrafficLightsLocked: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
Line 31: | Line 31: | ||
==See Also== | ==See Also== | ||
{{World_functions}} | {{World_functions}} | ||
Latest revision as of 19:03, 28 February 2012
Toggles whether you want the traffic lights to be locked. If the lights are locked, it means they won't change unless you do setTrafficLightState.
Syntax
bool setTrafficLightsLocked ( bool toggle )
Required Arguments
- toggle: A bool indicating whether you want the traffic lights to change automatically, or not
Returns
Returns true if the successful, false otherwise.
Example
This example toggles traffic lights between 'locked' and 'unlocked'.
function toggleTrafficLights() if areTrafficLightsLocked() then -- See if traffic lights are currently locked setTrafficLightsLocked(false) -- unlock traffic lights if they are currently locked else setTrafficLightsLocked(true) -- lock traffic lights if they are not locked end end -- add command handler for command which toggles lights addCommandHandler("toggletrafficlights",toggleTrafficLights)
See Also
- areTrafficLightsLocked
- getAircraftMaxHeight
- getAircraftMaxVelocity
- getCloudsEnabled
- getFarClipDistance
- getFogDistance
- getGameSpeed
- getGravity
- getHeatHaze
- getInteriorSoundsEnabled
- getJetpackMaxHeight
- getMinuteDuration
- getMoonSize
- getOcclusionsEnabled
- getRainLevel
- getSunColor
- getSunSize
- getTime
- getTrafficLightState
- getWeather
- getWindVelocity
- getSkyGradient
- getPlayerBlurLevel
- getZoneName
- isGarageOpen
- removeWorldModel
- resetFarClipDistance
- resetFogDistance
- resetHeatHaze
- resetMoonSize
- resetRainLevel
- resetSkyGradient
- resetSunColor
- resetSunSize
- resetWindVelocity
- restoreAllWorldModels
- restoreWorldModel
- setAircraftMaxHeight
- setAircraftMaxVelocity
- setCloudsEnabled
- setFarClipDistance
- setFogDistance
- setGameSpeed
- setGarageOpen
- setGravity
- setHeatHaze
- setInteriorSoundsEnabled
- setMinuteDuration
- setMoonSize
- setOcclusionsEnabled
- setRainLevel
- setSkyGradient
- setSunColor
- setSunSize
- setTime
- setTrafficLightState
- setTrafficLightsLocked
- setWeather
- setWeatherBlended
- setWindVelocity
- setJetpackMaxHeight
- setPlayerBlurLevel