SetVehiclePanelState: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
*'''theVehicle:''' The [[vehicle]] you would like to modify the panel of. | *'''theVehicle:''' The [[vehicle]] you would like to modify the panel of. | ||
*'''panelID:''' 0-6 | *'''panelID:''' 0-6 | ||
**'''6:''' Rear Bumper | |||
**'''5:''' Front Bumper | *'''Cars (0-3):''' | ||
**'''4:''' Windscreen | **'''6:''' Rear Bumper | ||
**'''5:''' Front Bumper | |||
**'''4:''' Windscreen | |||
**'''3:''' Unknown | **'''3:''' Unknown | ||
**'''2:''' Unknown | **'''2:''' Unknown | ||
**'''1:''' Unknown | **'''1:''' Unknown | ||
**'''0:''' Unknown | **'''0:''' Unknown | ||
*'''Planes (0-3):''' | |||
**'''6:''' Unknown | |||
**'''5:''' Unknown | |||
**'''4:''' Ailerons | |||
**'''3:''' Elevators | |||
**'''2:''' Rudder | |||
**'''1:''' Unknown | |||
**'''0:''' Engine Smoke | |||
*'''state:''' 0-255 (check what range is effective, it may be much smaller e.g. 0-3) | *'''state:''' 0-255 (check what range is effective, it may be much smaller e.g. 0-3) | ||
Revision as of 22:47, 25 January 2008
This function allows you to change the state of one of the six panels vehicle's can have. When executed on the server-side resources, the damage will be synched for all players, whereas the change is only client-side if the function is used in a client resource.
Syntax
bool setVehiclePanelState ( vehicle theVehicle, int panelID, int state )
Required Arguments
- theVehicle: The vehicle you would like to modify the panel of.
- panelID: 0-6
- Cars (0-3):
- 6: Rear Bumper
- 5: Front Bumper
- 4: Windscreen
- 3: Unknown
- 2: Unknown
- 1: Unknown
- 0: Unknown
- Planes (0-3):
- 6: Unknown
- 5: Unknown
- 4: Ailerons
- 3: Elevators
- 2: Rudder
- 1: Unknown
- 0: Engine Smoke
- state: 0-255 (check what range is effective, it may be much smaller e.g. 0-3)
Returns
Returns true if the panel state has been updated, false otherwise
Example
Click to collapse [-]
Example 1: Server-- create a new vehicle local newcar = createVehicle ( 520, 1024, 1024, 1024 ) -- break the front bumper off setVehiclePanelState ( newcar, 5, 4 )
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