From 406440e7d7b090239429f4e7e3b6f5de3c0d822d Mon Sep 17 00:00:00 2001 From: solareon <769465+solareon@users.noreply.github.com> Date: Sun, 23 Jun 2024 15:34:11 +0200 Subject: [PATCH] refactor(client): release models --- client/main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/main.lua b/client/main.lua index 53580a7..201ddcb 100644 --- a/client/main.lua +++ b/client/main.lua @@ -154,8 +154,8 @@ local function createSeller() for _, current in pairs(config.sellLocations) do current.model = type(current.model) == 'string' and joaat(current.model) or current.model lib.requestModel(current.model) - local currentCoords = vec4(current.coords.x, current.coords.y, current.coords.z - 1, current.coords.w) - local ped = CreatePed(0, current.model, currentCoords.x, currentCoords.y, currentCoords.z, currentCoords.w, false, false) + local ped = CreatePed(0, current.model, current.coords.x, current.coords.y, current.coords.z - 1, current.coords.w, false, false) + SetModelAsNoLongerNeeded(current.model) FreezeEntityPosition(ped, true) SetEntityInvincible(ped, true) SetBlockingOfNonTemporaryEvents(ped, true)