mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 02:08:55 +00:00
Unload model where applicable
This commit is contained in:
@@ -326,8 +326,8 @@ ESX.Game.SpawnObject = function(model, coords, cb)
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
ESX.Streaming.RequestModel(model)
|
||||
|
||||
local obj = CreateObject(model, coords.x, coords.y, coords.z, true, false, true)
|
||||
SetModelAsNoLongerNeeded(model)
|
||||
|
||||
if cb then
|
||||
cb(obj)
|
||||
@@ -340,8 +340,8 @@ ESX.Game.SpawnLocalObject = function(model, coords, cb)
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
ESX.Streaming.RequestModel(model)
|
||||
|
||||
local obj = CreateObject(model, coords.x, coords.y, coords.z, false, false, true)
|
||||
SetModelAsNoLongerNeeded(model)
|
||||
|
||||
if cb then
|
||||
cb(obj)
|
||||
|
||||
Reference in New Issue
Block a user