SetVehicleLightState: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">setVehicleLightState ( vehicle, state )</syntaxhighlight> | <syntaxhighlight lang="lua">void setVehicleLightState ( vehicle, light, state )</syntaxhighlight> | ||
==Required Arguments== | ==Required Arguments== | ||
*'''Vehicle:''' A handle to the [[vehicle]] that you wish to change the light state of. | *'''Vehicle:''' A handle to the [[vehicle]] that you wish to change the light state of. | ||
*'''Light:''' A whole number determining the individual light. | |||
*'''State:''' A whole number determining the new state of the light. (0: ok, 1: smashed) | *'''State:''' A whole number determining the new state of the light. (0: ok, 1: smashed) | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua">newcar = createVehicle ( 520, 1024, 1024, 1024 ) | <syntaxhighlight lang="lua"> | ||
state = setVehicleLightState ( newcar, 1 ) -- Breaks | newcar = createVehicle ( 520, 1024, 1024, 1024 ) | ||
state = setVehicleLightState ( newcar, 0, 1 ) -- Breaks a light on the vehicle. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Vehicle functions}} | {{Vehicle functions}} |
Revision as of 07:58, 30 October 2006
Description
This function sets the state of the light on the vehicle.
Syntax
void setVehicleLightState ( vehicle, light, state )
Required Arguments
- Vehicle: A handle to the vehicle that you wish to change the light state of.
- Light: A whole number determining the individual light.
- State: A whole number determining the new state of the light. (0: ok, 1: smashed)
Example
newcar = createVehicle ( 520, 1024, 1024, 1024 ) state = setVehicleLightState ( newcar, 0, 1 ) -- Breaks a light on the vehicle.
See Also
- addVehicleUpgrade
- attachTrailerToVehicle
- blowVehicle
- createVehicle
- detachTrailerFromVehicle
- fixVehicle
- getOriginalHandling
- getTrainDirection
- getTrainPosition
- getTrainSpeed
- getTrainTrack
- getVehicleColor
- getVehicleCompatibleUpgrades
- getVehicleController
- getVehicleDoorOpenRatio
- getVehicleDoorState
- getVehicleEngineState
- getVehicleHandling
- getVehicleHeadLightColor
- getVehicleLandingGearDown
- getVehicleLightState
- getVehicleMaxPassengers
- getVehicleModelFromName
- getVehicleName
- getVehicleNameFromModel
- getVehicleOccupant
- getVehicleOccupants
- getVehicleOverrideLights
- getVehiclePaintjob
- getVehiclePanelState
- getVehiclePlateText
- getVehicleSirenParams
- getVehicleSirens
- getVehicleSirensOn
- getVehicleTowedByVehicle
- getVehicleTowingVehicle
- getVehicleTurretPosition
- getVehicleType
- getVehicleUpgradeOnSlot
- getVehicleUpgradeSlotName
- getVehicleUpgrades
- getVehicleVariant
- getVehicleWheelStates
- isTrainDerailable
- isTrainDerailed
- isVehicleBlown
- isVehicleDamageProof
- isVehicleFuelTankExplodable
- isVehicleLocked
- isVehicleOnGround
- isVehicleTaxiLightOn
- removeVehicleUpgrade
- setTrainDerailable
- setTrainDerailed
- setTrainDirection
- setTrainPosition
- setTrainSpeed
- setTrainTrack
- setVehicleColor
- setVehicleDamageProof
- setVehicleDoorOpenRatio
- setVehicleDoorState
- setVehicleDoorsUndamageable
- setVehicleEngineState
- setVehicleFuelTankExplodable
- setVehicleHandling
- setVehicleHeadLightColor
- setVehicleLandingGearDown
- setVehicleLightState
- setVehicleLocked
- setVehicleOverrideLights
- setVehiclePaintjob
- setVehiclePanelState
- setVehiclePlateText
- setVehicleSirens
- setVehicleSirensOn
- setVehicleTaxiLightOn
- setVehicleTurretPosition
- setVehicleVariant
- setVehicleWheelStates