Merge pull request #498 from vrnagy/patch-2

fix(es_extended): onesync.lua coords variables
This commit is contained in:
Benzo
2022-09-25 18:36:21 +02:00
committed by GitHub
+2 -2
View File
@@ -65,7 +65,7 @@ end
function ESX.OneSync.SpawnVehicle(model, coords, heading, autoMobile, Properties, cb)
model = type(model) == 'string' and joaat(model) or model
Properties = Properties or {}
local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
local coords = type(coords) == "vector3" and coords or vector3(coords.x, coords.y, coords.z)
if type(autoMobile) ~= 'boolean' then
return
end
@@ -86,7 +86,7 @@ end
---@param cb function
function ESX.OneSync.SpawnObject(model, coords, heading, cb)
if type(model) == 'string' then model = joaat(model) end
local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
local coords = type(coords) == "vector3" and coords or vector3(coords.x, coords.y, coords.z)
CreateThread(function()
local entity = CreateObject(model, coords, true, true)
while not DoesEntityExist(entity) do Wait(50) end