Skip to main content

Vehicle::isAConvertible

Client-side function

JavaScript​

Returns whether given vehicle has a converitble roof and an animation to lower/raise it.

Required Params​

  • extraRoofCheck boolean Checks for vehicle roofs without animation that were added using vehicle extras.

Return value​

  • boolean

Syntax​

vehicle.isAConvertible(extraRoofCheck)

Example​

const vehicle = mp.players.local.vehicle;
if (!vehicle || !mp.vehicles.exists(vehicle)) return;
const isConvertible = vehicle.isAConvertible(true);
mp.console.logInfo(`Player's vehicle ${isConvertible ? 'is convertible' : 'is not convertible'}`);