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,9 +1,6 @@
|
||||
if GetResourceState('illenium-appearance') ~= 'started' then return end
|
||||
|
||||
Clothing = Clothing or {}
|
||||
|
||||
StoredOldClothing = {}
|
||||
|
||||
Clothing.SetAppearance = function(clothingData)
|
||||
local clothing = {}
|
||||
if GetEntityModel(cache.ped) == `mp_m_freemode_01` then
|
||||
@@ -15,7 +12,7 @@ Clothing.SetAppearance = function(clothingData)
|
||||
clothing.props = exports['illenium-appearance']:getPedProps(cache.ped)
|
||||
|
||||
Prints.Debug(json.encode(clothingData, {indent = true}))
|
||||
StoredOldClothing = clothing
|
||||
ClothingBackup = clothing
|
||||
exports['illenium-appearance']:setPedComponents(cache.ped, clothingData.components)
|
||||
exports['illenium-appearance']:setPedProp(cache.ped, clothingData.props)
|
||||
return true
|
||||
@@ -35,8 +32,8 @@ Clothing.GetAppearance = function()
|
||||
end
|
||||
|
||||
Clothing.RestoreAppearance = function()
|
||||
exports['illenium-appearance']:setPedComponents(cache.ped, StoredOldClothing.components)
|
||||
exports['illenium-appearance']:setPedProp(cache.ped, StoredOldClothing.props)
|
||||
exports['illenium-appearance']:setPedComponents(cache.ped, ClothingBackup.components)
|
||||
exports['illenium-appearance']:setPedProp(cache.ped, ClothingBackup.props)
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user