SetDisableHeliExplodeFromBodyDamage
DocsSetDisableHeliExplodeFromBodyDamage(helicopter, disableExplode)Description
Introduced in build 1103
Prevents a helicopter from exploding due to relatively minor body damage.
Parameters
| Name | Type | Description |
|---|---|---|
helicopter | Vehicle | The helicopter 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 Vehiclehelicopter
helicopterUse 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 helicopter the player is currently in.
local helicopter = GetVehiclePedIsIn(playerPed, false)
-- If the player is not in a helicopter, or the vehicle is not a helicopter, return.
if (helicopter == 0) or (not IsThisModelAHeli(GetEntityModel(helicopter))) then return end
-- Disable explosion from body damage for the helicopter.
SetDisableHeliExplodeFromBodyDamage(helicopter, true)