@MarkCavalli
I added the option to open convertible roof, if u want to add to your project:
- sVehicleSingletone.js
mp.events.add({
...
"sKeys-Num8": (player) => {
if (!player.loggedIn || !player.vehicle) return;
player.vehicle.raiseConvertibleRoof(player);
},
...
});
- sVehicle.js
...
constructor (d) {
...
vehicle.raiseConvertibleRoof = function (player) {
mp.players.forEach((p, id) => {
p.call("cVehicle-raiseConvertibleRoof", [this]);
});
}
...
}
- cVehicle.js
...
constructor() {
...
mp.events.add({
...
"cVehicle-raiseConvertibleRoof": (vehicle) => {
let roofState = vehicle.getConvertibleRoofState();
if (roofState === 0) {
vehicle.lowerConvertibleRoof(false);
} else if (roofState === 2) {
vehicle.raiseConvertibleRoof(false);
} else {
mp.gui.chat.push("Already using Convertible Roof. Try again later.");
}
},
...
});
}
...
- Menu.html
...
<script type="text/x-template" id="tab-help">
<section class="info tab-vehicles">
<div class="veh-list">
<a class="veh-item" v-for="(item, i) in d.i18n.help" @click="currentTab = i" :class="[{ active: currentTab === i }]">
<span>{{ item }}</span>
</a>
</div>
<div class="veh-info">
<div class="gps" v-if="currentTab === 0">
<p class="help-p">{{ d.i18n.helpStart1 }}</p>
<p class="help-p">{{ d.i18n.helpStart2 }}</p>
</div>
<div class="gps" v-if="currentTab === 1">
<div class="veh-info_props">
...
<div class="veh-info_prop">
<img src="img/reardoor.png">
<span>Num 8</span>
<div>{{ d.i18n.convertibleroof }}</div>
</div>
...
</div>
</div>
</div>
</section>
</script>
...
const app = new Vue({
el: '#app',
data: {
pName: '',
currentTab: 0,
d: {
...
i18n: {
...
rear: 'rear',
windows: 'windows',
convertibleroof: 'Convertible Roof',
settings: ["Basic"],
Change: 'Change',
...
},
...
},
},
},
...
function loadRusLang() { // Do it to all languages.
app.d.i18n = {
...
convertibleroof: 'Convertible Roof',
...
}
}
It's recommended change the image icon reardoor.png to one that really represents convertible roof. (I'm looking for one too, if someone have one and would like to share would be very helpful)
I got the same eg as windows, so i think its all right and its synced.