Fixed vehicle sync
This commit is contained in:
@@ -27,6 +27,7 @@ mp.events.add("VehStream_SetLockStatus", (veh, status) => {
|
||||
});
|
||||
|
||||
mp.events.add("VehStream_PlayerEnterVehicleAttempt", (entity, seat) => {
|
||||
entity = mp.vehicles.atRemoteId(entity);
|
||||
if (entity === undefined || entity === null || !entity.isAVehicle()) return;
|
||||
if (typeof entity.getVariable("VehicleSyncData") !== 'undefined') {
|
||||
var toggle = entity.getVariable("VehicleSyncData");
|
||||
@@ -51,7 +52,7 @@ mp.events.add("VehStream_PlayerExitVehicleAttempt", (entity) => {
|
||||
|
||||
mp.events.add("VehStream_PlayerExitVehicle", (entity) => {
|
||||
entity = mp.vehicles.atRemoteId(entity);
|
||||
if (entity === undefined || entity === null/* || !entity.isAVehicle()*/) {
|
||||
if (entity === undefined || entity === null || !entity.isAVehicle()) {
|
||||
return;
|
||||
}
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user