fix: saving clothes by character id error

This commit is contained in:
Andyyy7666
2022-12-25 16:39:49 +01:00
committed by GitHub
parent a9d42b9861
commit 68563c6d18

View File

@@ -68,7 +68,8 @@ end)
-- Update the characters clothes. -- Update the characters clothes.
RegisterNetEvent("ND:updateClothes", function(clothing) RegisterNetEvent("ND:updateClothes", function(clothing)
local player = source local player = source
NDCore.Functions.SetPlayerData(player, "clothing", clothing) local character = NDCore.Players[player].id
NDCore.Functions.SetPlayerData(character.id, "clothing", clothing)
end) end)
-- Disconnecting a player -- Disconnecting a player
@@ -111,4 +112,4 @@ AddEventHandler("onResourceStart", function(resourceName)
NDCore.PlayersDiscordInfo[tonumber(playerId)] = discordInfo NDCore.PlayersDiscordInfo[tonumber(playerId)] = discordInfo
end end
end end
end) end)