attempt to clean up clothing start
This commit is contained in:
1 parent
d230cf1242
commit
78ad6c2932
11 files changed
+106
-155
No files matched your search
@@ -1,23 +1,49 @@
|
||||
Clothing = Clothing or {}
|
||||
|
||||
StoredOldClothing = {}
|
||||
|
||||
Clothing.SetAppearance = function(clothingData)
|
||||
ClothingBackup = {}
|
||||
|
||||
Clothing.SetAppearance = function(data)
|
||||
ClothingBackup = Clothing.GetAppearance()
|
||||
Utility.SetEntitySkinData(cache.ped, data)
|
||||
return true
|
||||
end
|
||||
|
||||
Clothing.GetAppearance = function()
|
||||
local clothing = {}
|
||||
|
||||
return clothing
|
||||
return Utility.GetEntitySkinData(cache.ped)
|
||||
end
|
||||
|
||||
Clothing.RestoreAppearance = function()
|
||||
|
||||
Utility.SetEntitySkinData(cache.ped, ClothingBackup)
|
||||
return true
|
||||
end
|
||||
|
||||
Clothing.ReloadSkin = function()
|
||||
Utility.SetEntitySkinData(cache.ped, ClothingBackup)
|
||||
return true
|
||||
end
|
||||
|
||||
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)
|
||||
|
||||
RegisterNetEvent('community_bridge:client:ReloadSkin', function()
|
||||
Clothing.ReloadSkin()
|
||||
end)
|
||||
Reference in new issue
Block a user