SetVehicleLightState: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{Server client function}} | |||
==Description== | ==Description== | ||
This function sets the state of the light on the vehicle. | This function sets the state of the light on the vehicle. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">void setVehicleLightState ( vehicle, light, state )</syntaxhighlight> | <syntaxhighlight lang="lua">void setVehicleLightState ( vehicle theVehicle, int light, int state )</syntaxhighlight> | ||
==Required Arguments== | ==Required Arguments== | ||
*''' | *'''theVehicle:''' 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== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
newcar = createVehicle ( 520, 1024, 1024, 1024 ) | newcar = createVehicle ( 520, 1024, 1024, 1024 ) -- create a new vehicle | ||
state = setVehicleLightState ( newcar, 0, 1 ) -- | state = setVehicleLightState ( newcar, 0, 1 ) -- break one of its lights | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Vehicle functions}} | {{Vehicle functions}} |
Revision as of 19:32, 15 August 2007
Description
This function sets the state of the light on the vehicle.
Syntax
void setVehicleLightState ( vehicle theVehicle, int light, int state )
Required Arguments
- theVehicle: 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 ) -- create a new vehicle state = setVehicleLightState ( newcar, 0, 1 ) -- break one of its lights
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