mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 01:38:52 +00:00
temp fix for vehicle ownership
This commit is contained in:
@@ -489,8 +489,9 @@ function ESX.Game.SpawnVehicle(vehicle, coords, heading, cb, networked)
|
||||
print("Spawned Vehicle: " .. NetID)
|
||||
if NetID then
|
||||
local vehicle = NetworkGetEntityFromNetworkId(NetID)
|
||||
while not DoesEntityExist(vehicle) do
|
||||
while not DoesEntityExist(vehicle) and not NetworkHasControlOfEntity(vehicle) do
|
||||
vehicle = NetworkGetEntityFromNetworkId(NetID)
|
||||
NetworkRequestControlOfEntity(vehicle)
|
||||
Wait(0)
|
||||
end
|
||||
SetEntityAsMissionEntity(vehicle, true, true)
|
||||
|
||||
Reference in New Issue
Block a user