SetDisableExplodeFromBodyDamageOnCollision
DocsSetDisableExplodeFromBodyDamageOnCollision(vehicle, disableExplode)Description
Introduced in build 1290
Prevents a vehicle from exploding upon sustaining body damage from physical collisions. This can be used to increase the durability of vehicles in high-impact scenarios, such as races or combat situations, by preventing them from being destroyed due to collision-induced body damage.
For helicopters, you might want to check <code>SET_DISABLE_HELI_EXPLODE_FROM_BODY_DAMAGE</code> instead.
Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | The vehicle to apply this setting to. |
disableExplode | BOOL | `true` to disable explosion from body damage on collision; `false` to allow explosions as normal. |
Quick Snippet: Get Vehiclevehicle
vehicleUse this to get the current vehicle handle for this native.
-- Get the vehicle the player is currently in
local ped = PlayerPedId()
local vehicle = GetVehiclePedIsIn(ped, false)
if vehicle ~= 0 then
print("Vehicle handle: " .. vehicle)
print("Model: " .. GetEntityModel(vehicle))
else
print("Player is not in a vehicle")
endVehicle Models

adder
alpha
blade
ardent
asea
cogcabrio
baller
blistaReturns
voidThis native does not return a value.
Examples
Official
-- Retrieve the player ped
local playerPed = PlayerPedId()
-- Retrieve the vehicle the player is currently in
local vehicle = GetVehiclePedIsIn(playerPed, false)
-- Disable explosion from body damage on collision for the vehicle
SetDisableExplodeFromBodyDamageOnCollision(vehicle, true)