From 020ad8a176aeb42094fd9ea7bc1041698d505c2b Mon Sep 17 00:00:00 2001 From: Andyyy7666 <86536434+Andyyy7666@users.noreply.github.com> Date: Mon, 14 Nov 2022 00:53:23 +0100 Subject: [PATCH] fix: unload character on character swap --- server/functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/functions.lua b/server/functions.lua index aab5959..7406857 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -251,7 +251,7 @@ end -- Adds the players character to the NDCore.Players table, this table consists of every players selected character. function NDCore.Functions.SetActiveCharacter(player, characterId) if NDCore.Players[player] then - NDCore.Functions.SaveInventory(player) + TriggerEvent("ND:characterUnloaded", player, NDCore.Players[player]) end local result = MySQL.query.await("SELECT * FROM characters WHERE character_id = ? LIMIT 1", {characterId}) if result then