From 8de2e4311ab21781bb5da56f8c3bde17a87fff8e Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Sat, 11 Apr 2020 11:53:50 +0200 Subject: [PATCH] Unload model where applicable --- client/functions.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/functions.lua b/client/functions.lua index 8d2ea626..26bc233b 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -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)