IsVehicleAConvertible
Docslocal retval = IsVehicleAConvertible(vehicle, checkRoofExtras)Description
Introduced in build 323
Determines if a vehicle is a convertible with an animatable roof. This native checks if the specified vehicle model features a convertible roof that can be lowered or raised through an animation.
Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | The vehicle to check. |
checkRoofExtras | BOOL | When set to `false`, the native checks only for vehicles with an animatable convertible roof. Set to `true` to include additional checks for vehicles that might have a non-animatable roof (i.e., using vehicle extras) |
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
BOOLReturns TRUE (1) or FALSE (0).
Examples
Official
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if IsVehicleAConvertible(vehicle, false) then
print("The vehicle is a convertible with an animatable roof.")
else
print("The vehicle is not a convertible or does not have an animatable roof.")
end