evtl fix client errors

This commit is contained in:
hydrant
2020-07-31 18:33:19 +02:00
parent b88427db5c
commit 48fb9fdd88
2 changed files with 18 additions and 0 deletions

View File

@@ -1,5 +1,8 @@
export default function tuningSync() {
mp.events.add('entityStreamIn', (entity: EntityMp) => {
if (!entity) {
return;
}
if (entity.isAVehicle()) {
var vehicle: VehicleMp = entity as VehicleMp;
@@ -16,10 +19,17 @@
});
mp.events.add('vehicleToggleMod', (veh, slot, newval) => {
if (!veh) {
return;
}
veh.toggleMod(slot, newval);
});
mp.events.addDataHandler("vehicleTaxiLight", (entity: VehicleMp, state: boolean) => {
if (!entity) {
return;
}
entity.setTaxiLights(state);
});
}