Files
community_bridge/modules/clothing/fivem-appearance/client.lua
T

31 lines
889 B
Lua
Raw Normal View History

2025-01-08 06:33:31 -05:00
if GetResourceState('fivem-appearance') ~= 'started' then return end
Clothing = Clothing or {}
2025-01-08 06:33:31 -05:00
2025-02-06 23:33:31 -05:00
Clothing.SetAppearance = function(data)
local clothing = {}
2025-01-08 06:33:31 -05:00
if GetEntityModel(cache.ped) == `mp_m_freemode_01` then
2025-02-06 23:33:31 -05:00
clothing = data.male
2025-01-08 06:33:31 -05:00
else
2025-02-06 23:33:31 -05:00
clothing = data.female
2025-01-08 06:33:31 -05:00
end
2025-02-06 23:33:31 -05:00
ClothingBackup = exports['fivem-appearance']:getPedAppearance(cache.ped)
exports['fivem-appearance']:setPedAppearance(cache.ped, clothing)
2025-01-08 06:33:31 -05:00
return true
end
Clothing.GetAppearance = function()
return exports['fivem-appearance']:getPedAppearance(cache.ped)
end
Clothing.RestoreAppearance = function()
2025-02-06 23:33:31 -05:00
if not next(ClothingBackup) then
return false
end
exports['fivem-appearance']:setPedAppearance(cache.ped, ClothingBackup)
return true
2025-01-08 06:33:31 -05:00
end
Clothing.ReloadSkin = function()
TriggerEvent("fivem-appearance:client:reloadSkin", true)
2025-02-06 23:33:31 -05:00
return true
2025-01-08 06:33:31 -05:00
end