Fixed vehiclesync issues

This commit is contained in:
hydrant
2018-12-10 22:18:53 +01:00
parent 43cf1edc7a
commit 9b63c53cc8

View File

@@ -309,7 +309,7 @@ mp.events.add("VehStream_SetVehicleDoorStatus_Single", (veh, door, state) => {
}); });
mp.events.add("VehStream_SetVehicleDoorStatus", (...args) => { mp.events.add("VehStream_SetVehicleDoorStatus", (...args) => {
if (args[0] !== undefined) { if (args[0] !== undefined && args[0] !== null) {
let y = 0; let y = 0;
for (y = 1; y < args.length; y++) { for (y = 1; y < args.length; y++) {
if (args[y] === 0) { if (args[y] === 0) {
@@ -399,7 +399,7 @@ mp.events.add("VehStream_SetVehicleWheelStatus_Single", (veh, wheel, state) => {
}); });
mp.events.add("VehStream_SetVehicleWheelStatus", (...args) => { mp.events.add("VehStream_SetVehicleWheelStatus", (...args) => {
if (args[0] !== undefined) { if (args[0] !== undefined && args[0] !== null) {
let y = 0; let y = 0;
for (y = 1; y < args.length; y++) { for (y = 1; y < args.length; y++) {
if (y === 9) { if (y === 9) {