From abe4400b006be98539fe009b7a895933f4d9f788 Mon Sep 17 00:00:00 2001 From: solareon <769465+solareon@users.noreply.github.com> Date: Sun, 23 Jun 2024 15:50:29 +0200 Subject: [PATCH] refactor(client): release models --- client/main.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/main.lua b/client/main.lua index 71fff93..0b31959 100644 --- a/client/main.lua +++ b/client/main.lua @@ -381,6 +381,7 @@ local function setupGarageZone() if config.useTarget then lib.requestModel(`a_m_m_indian_01`) taxiPed = CreatePed(3, `a_m_m_indian_01`, 894.93, -179.12, 74.7 - 1.0, 237.09, false, true) + SetModelAsNoLongerNeeded(`a_m_m_indian_01`) SetBlockingOfNonTemporaryEvents(taxiPed, true) FreezeEntityPosition(taxiPed, true) SetEntityInvincible(taxiPed, true) @@ -501,6 +502,7 @@ RegisterNetEvent('qb-taxi:client:DoTaxiNpc', function() local model = GetHashKey(config.npcSkins[Gender][PedSkin]) lib.requestModel(model) NpcData.Npc = CreatePed(3, model, sharedConfig.npcLocations.takeLocations[NpcData.CurrentNpc].x, sharedConfig.npcLocations.takeLocations[NpcData.CurrentNpc].y, sharedConfig.npcLocations.takeLocations[NpcData.CurrentNpc].z - 0.98, sharedConfig.npcLocations.takeLocations[NpcData.CurrentNpc].w, true, true) + SetModelAsNoLongerNeeded(model) PlaceObjectOnGroundProperly(NpcData.Npc) FreezeEntityPosition(NpcData.Npc, true) if NpcData.NpcBlip ~= nil then