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

@@ -4,10 +4,18 @@
});
mp.events.add('toggleVehicleSiren', (vehicle, state) => {
if (!vehicle) {
return;
}
vehicle.setSirenSound(state);
});
mp.events.add('entityStreamIn', (entity) => {
if (!entity) {
return;
}
if (entity.isAVehicle()) {
var state = entity.getVariable("sirenSound");
if (state === undefined) return;