Skip to main content

Vehicle::lowerConvertibleRoof

Lowers the roof of a convertable, can be done instantly or with the animation.

Syntax​

vehicle.lowerConvertibleRoof(instantlyLower);

Required Arguments​

  • instantlyLower: Boolean

Return value​

  • Undefined

Example​

Pressing the F2 key will raise/lower your convertable roof

Client-Side

mp.keys.bind(0x71, true, function() {
let roofState = mp.players.local.vehicle.getConvertibleRoofState();
if(roofState === 0){
mp.players.local.vehicle.lowerConvertibleRoof(false);
} else if (roofState === 2){
mp.players.local.vehicle.raiseConvertibleRoof(false);
} else {
mp.gui.chat.push("Please wait for the roof to stop changing.");
}
});