rcore_clothing partial support
This relys on the default server file to handle most, but we have opening menus and when rcore_clothing provides as qb/esx_skin this should resolve the errors if the framework didnt match the bridged option. Formatting fixed, debug commands disabled as this is for production.
This commit is contained in:
1 parent
a280606c3d
commit
c7d638cbfb
13 files changed
+124
-174
No files matched your search
@@ -1,5 +1,6 @@
|
||||
---@diagnostic disable: duplicate-set-field
|
||||
if GetResourceState('esx_skin') == 'missing' then return end
|
||||
if GetResourceState('rcore_clothing') ~= 'missing' then return end
|
||||
Clothing = Clothing or {}
|
||||
Clothing.Players = {}
|
||||
|
||||
@@ -17,7 +18,7 @@ function Clothing.GetFullAppearanceData(src)
|
||||
|
||||
if Clothing.Players[citId] then return Clothing.Players[citId] end
|
||||
|
||||
local result = MySQL.query.await('SELECT skin FROM users WHERE identifier = ?', { citId})
|
||||
local result = MySQL.query.await('SELECT skin FROM users WHERE identifier = ?', { citId })
|
||||
if result[1] == nil then return end
|
||||
|
||||
local model = GetEntityModel(GetPlayerPed(src))
|
||||
@@ -63,6 +64,7 @@ function Clothing.Save(src)
|
||||
citId
|
||||
})
|
||||
end
|
||||
|
||||
---Sets a player's appearance based on the provided data
|
||||
---@param src number The server ID of the player
|
||||
---@param data table The appearance data to apply
|
||||
@@ -172,4 +174,4 @@ end)
|
||||
Callback.Register('community_bridge:cb:GetAppearance', function(source)
|
||||
local src = source
|
||||
return Clothing.GetAppearance(src)
|
||||
end)
|
||||
end)
|
||||
Reference in new issue
Block a user