_GET_VEHICLE_BOMB_COUNT
Docslocal retval = GetVehicleBombCount(aircraft)Description
Gets the amount of bombs that this vehicle has. As far as I know, this does not impact vehicle weapons or the ammo of those weapons in any way, it is just a way to keep track of the amount of bombs in a specific plane.
In decompiled scripts this is used to check if the vehicle has enough bombs before a bomb can be dropped (bombs are dropped by using <code>_SHOOT_SINGLE_BULLET_BETWEEN_COORDS_WITH_EXTRA_PARAMS</code>).
Use <code>_SET_AIRCRAFT_BOMB_COUNT</code> to set the amount of bombs on that vehicle.
Parameters
| Name | Type | Description |
|---|---|---|
aircraft | Vehicle | The vehicle to get the amount of bombs from. |
Quick Snippet: Get Vehicleaircraft
aircraftUse 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
intReturns an integer value.
Examples
Official
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
print("This plane has " .. GetAircraftBombCount(vehicle) .. " bombs left.")