mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-16 21:46:03 +01:00
fix: unload character on character swap
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user