RaiseConvertibleRoof
DocsRaiseConvertibleRoof(vehicle, instantlyRaise)Description
Introduced in build 323
Raises the roof on a convertible vehicle, utilizing any available animations for the action. This native is particularly useful for creating a realistic interaction with convertible vehicles by animating the process of raising the roof.
You can check if the vehicle has an convertible roof using <code>IS_VEHICLE_A_CONVERTIBLE</code>.
To lower the convertible roof, you can use <code>LOWER_CONVERTIBLE_ROOF</code>.
Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | The convertible vehicle whose roof you wish to raise. |
instantlyRaise | BOOL | A boolean indicating whether the roof should be raised instantly without the animation transition. Set `false` to raise the roof with the animation, or `true` to raise it immediately. |
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
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if not IsVehicleAConvertible(vehicle, false) then return end
RaiseConvertibleRoof(vehicle, false)