SetConvertibleRoof
DocsSetConvertibleRoof(vehicle, toggle)Description
Enables or disables the convertible roof on vehicles that support old-style GTA IV roofs, which are not animated. Setting toggle to true will apply the roof to the vehicle, and setting it to false will remove the roof, assuming the vehicle has versions with and without a roof.
If you want to lock or unlock the roof mechanism, use <code>SET_CONVERTIBLE_ROOF_LATCH_STATE</code>.
You can check if the vehicle has a roof with <code>DOES_VEHICLE_HAVE_ROOF</code>.
#### Vehicles with both roofed and roofless versions (others may exist; this list is compiled from decompiled scripts).
chino
voltic
buccaneer
buccaneer2
chino2
faction
faction2
mamba
Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | The vehicle to which the roof state will be applied. |
toggle | BOOL | Boolean value where `true` adds the roof and `false` removes it, applicable only if the vehicle has a version with and without a roof. |
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
-- In this case we are removing the roof from the vehicle.
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if not DoesVehicleHaveRoof(vehicle) then return end
SetConvertibleRoof(vehicle, false)