SetVehicleDamage: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
Line 14: | Line 14: | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua"> | <syntaxhighlight lang="Lua"> | ||
__EDIT_ME__ | |||
</syntaxhighlight> | </syntaxhighlight> | ||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{VehicleFunctions}} | {{VehicleFunctions}} |
Revision as of 12:26, 2 September 2020
Description
Sets the vehicle damage for a specific part/region of the vehicle.
Syntax
SetVehicleDamage(vehicle, damageIndex, damage)
Parameters
- vehicle
Vehicle identifier. - damageIndex
Damage part of the vehicle between 1-8, depending on the vehicle. - damage
Value between 0.0 (no damage) and 1.0 (full damage).
Return Value
- Returns true on success.
Example
__EDIT_ME__
See also
- CreateVehicle
- DestroyVehicle
- IsValidVehicle
- GetVehicleCount
- GetAllVehicles
- GetVehicleModel
- GetVehicleModelName
- SetVehicleRespawnParams
- IsVehicleStreamedIn
- GetStreamedVehiclesForPlayer
- GetStreamedVehicles
- SetVehicleLocation
- GetVehicleLocation
- SetVehicleRotation
- GetVehicleRotation
- SetVehicleHeading
- GetVehicleHeading
- SetVehicleHealth
- GetVehicleHealth
- SetVehicleLicensePlate
- GetVehicleVelocity
- GetVehicleDriver
- GetVehiclePassenger
- GetVehicleNumberOfSeats
- SetVehicleColor
- GetVehicleColor
- SetVehicleLinearVelocity
- SetVehicleAngularVelocity
- GetVehicleGear
- SetVehicleHoodRatio
- GetVehicleHoodRatio
- SetVehicleTrunkRatio
- GetVehicleTrunkRatio
- StartVehicleEngine
- StopVehicleEngine
- GetVehicleEngineState
- SetVehicleLightEnabled
- GetVehicleLightState
- SetVehicleDamage
- GetVehicleDamage
- AttachVehicleNitro