- Documentation
- Shared functions
- getPlayerClothesAll
Function
getPlayerClothesAll
Returns the player's whole outfit set by scripts: a part -> { texture, model, color, name } table.
Syntax
table getPlayerClothesAll(player thePlayer)Arguments
thePlayerplayer- The player.
Returns
A { [part] = { texture, model, color, name } } table or false.
Example
Saving the player's outfit to the account data.
addEventHandler("onPlayerQuit", root, function()
local account = getPlayerAccount(source)
if not isGuestAccount(account) then
setAccountData(account, "stroj", toJSON(getPlayerClothesAll(source)))
end
end)