add openClothin() function

Attempts to open clothing scripts menus

Still testing this one
This commit is contained in:
Jim Shield
2025-09-09 18:49:26 +01:00
parent 6c09e55fd4
commit 301b069312
2 changed files with 47 additions and 4 deletions

View File

@@ -898,3 +898,50 @@ function GetPlayersFromCoords(coords, radius)
end end
return players return players
end end
-------------------------------------------------------------
-- Clothing Script Selection
-------------------------------------------------------------
local wardrobeFunc = {
{ name = "qb-clothing",
openWardrobe = function()
TriggerEvent("qb-clothing:client:OpenMenu")
end,
},
{ name = "esx_skin",
openWardrobe = function()
TriggerEvent("esx_skin:openSaveableMenu",
function()
finished = true
end, function()
finished = true
end)
end,
},
{ name = "illenium-appearance",
openWardrobe = function()
exports['illenium-appearance']:startPlayerCustomization(function(appearance)
if appearance then
TriggerServerEvent("illenium-appearance:server:saveAppearance", appearance)
end
end, {
components = true, componentConfig = { masks = true, upperBody = true, lowerBody = true, bags = true, shoes = true, scarfAndChains = true, bodyArmor = true, shirts = true, decals = true, jackets = true },
props = true, propConfig = { hats = true, glasses = true, ear = true, watches = true, bracelets = true },
enableExit = true,
})
end,
},
}
--- Opens the clothing customization menu
function openClothing()
for i = 1, #wardrobeFunc do
local script = wardrobeFunc[i]
if isStarted(script.name) then
script.openWardrobe()
break
end
end
end

View File

@@ -535,10 +535,6 @@ function ShowFloatingHelpNotification(coord, text, highlight)
EndTextCommandDisplayHelp(2, false, false, -1) EndTextCommandDisplayHelp(2, false, false, -1)
end end
function updateCachedText(target)
target.text = table.concat(target.buttontext, "\n")
end
------------------------------------------------------------- -------------------------------------------------------------
-- Cleanup on Resource Stop -- Cleanup on Resource Stop
------------------------------------------------------------- -------------------------------------------------------------