export default function tuningSync() {
    mp.events.add('entityStreamIn', (entity: EntityMp) => {
        if (entity.isAVehicle()) {

            var vehicle: VehicleMp = entity as VehicleMp;

            var taxiLight = entity.getVariable("vehicleTaxiLight");
            if (taxiLight) vehicle.setTaxiLights(taxiLight);

            var mod18 = vehicle.getVariable('mod18');

            if (mod18 !== undefined) {
                vehicle.toggleMod(18, mod18);
            }
        }
    });

    mp.events.add('vehicleToggleMod', (veh, slot, newval) => {
        veh.toggleMod(slot, newval);
    });

    mp.events.addDataHandler("vehicleTaxiLight", (entity: VehicleMp, state: boolean) => {
        entity.setTaxiLights(state);
    });
}