SET_VEHICLE_DAMAGE
Apply damage to vehicle at a location.
Hash
0x1D7678F81452BB41Runtime name
SetVehicleDamageNamespaceVEHICLE
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0xA1DD317EA8FD4F29Signature
void SET_VEHICLE_DAMAGE(Vehicle vehicle, float xOffset, float yOffset, float zOffset, float damage, float radius, BOOL p6);Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | — |
xOffset | float | — |
yOffset | float | — |
zOffset | float | — |
damage | float | — |
radius | float | — |
p6 | BOOL | — |
Returns void
Description
Apply damage to vehicle at a location. Location is relative to vehicle model (not world).
Radius of effect damage applied in a sphere at impact location
Usage
SetVehicleDamage(vehicle, xOffset, yOffset, zOffset, damage, radius, p6)
-- always works, by hash
Citizen.InvokeNative(0x1D7678F81452BB41, vehicle, xOffset, yOffset, zOffset, damage, radius, p6)JavaScript and C#
SetVehicleDamage(vehicle, xOffset, yOffset, zOffset, damage, radius, p6);
// by hash
Citizen.invokeNative('0x1D7678F81452BB41', vehicle, xOffset + 0.0000001, yOffset + 0.0000001, zOffset + 0.0000001, damage + 0.0000001, radius + 0.0000001, p6);Function.Call((Hash)0x1D7678F81452BB41, vehicle, xOffset, yOffset, zOffset, damage, radius, p6);- Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.