Files
community_bridge/modules/clothing/_default/client.lua
T

49 lines
1.1 KiB
Lua
Raw Normal View History

Clothing = Clothing or {}
2025-02-06 23:33:31 -05:00
ClothingBackup = {}
2025-02-06 23:33:31 -05:00
Clothing.SetAppearance = function(data)
ClothingBackup = Clothing.GetAppearance()
Utility.SetEntitySkinData(cache.ped, data)
return true
end
Clothing.GetAppearance = function()
2025-02-06 23:33:31 -05:00
return Utility.GetEntitySkinData(cache.ped)
end
Clothing.RestoreAppearance = function()
2025-02-06 23:33:31 -05:00
Utility.SetEntitySkinData(cache.ped, ClothingBackup)
return true
end
Clothing.ReloadSkin = function()
2025-02-06 23:33:31 -05:00
Utility.SetEntitySkinData(cache.ped, ClothingBackup)
return true
end
Clothing.UpdateAppearanceBackup = function(data)
ClothingBackup = data
end
RegisterNetEvent('community_bridge:client:updateClothingBackup', function(skindata)
ClothingBackup = skindata
end)
RegisterNetEvent('community_bridge:client:SetAppearance', function(data)
Clothing.SetAppearance(data)
end)
RegisterNetEvent('community_bridge:client:GetAppearance', function()
Clothing.GetAppearance()
end)
RegisterNetEvent('community_bridge:client:RestoreAppearance', function()
Clothing.RestoreAppearance()
end)
2025-02-06 23:33:31 -05:00
RegisterNetEvent('community_bridge:client:ReloadSkin', function()
Clothing.ReloadSkin()
end)