From 74d27e4d807df57c32ce9145ec659d2c48422258 Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Sat, 16 Jun 2018 10:31:01 +0200 Subject: [PATCH] Manual revert: buggy networked vehicle It broke prop spawning so it's gone. --- __resource.lua | 2 +- client/functions.lua | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/__resource.lua b/__resource.lua index efea945d..7bfb5a51 100644 --- a/__resource.lua +++ b/__resource.lua @@ -1,4 +1,4 @@ -resource_manifest_version '05cfa83c-a124-4cfa-a768-c24a5811d8f9' +resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' description 'ES Extended' diff --git a/client/functions.lua b/client/functions.lua index 4dbd7750..1e373b01 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -397,7 +397,8 @@ ESX.Game.SpawnVehicle = function(modelName, coords, heading, cb) local id = NetworkGetNetworkIdFromEntity(vehicle) SetNetworkIdCanMigrate(id, true) - SetVehicleHasBeenOwnedByPlayer(vehicle, true) + SetEntityAsMissionEntity(vehicle, true, false) + SetVehicleHasBeenOwnedByPlayer(vehicle, true) SetModelAsNoLongerNeeded(model) RequestCollisionAtCoord(coords.x, coords.y, coords.z) @@ -431,7 +432,8 @@ ESX.Game.SpawnLocalVehicle = function(modelName, coords, heading, cb) local vehicle = CreateVehicle(model, coords.x, coords.y, coords.z, heading, false, false) - SetVehicleHasBeenOwnedByPlayer(vehicle, true) + SetEntityAsMissionEntity(vehicle, true, false) + SetVehicleHasBeenOwnedByPlayer(vehicle, true) SetModelAsNoLongerNeeded(model) RequestCollisionAtCoord(coords.x, coords.y, coords.z)