HumanTree92/esx_advancedjail

Having troubles with loading prison_wear

Closed this issue · 2 comments

Describe the Bug | A Clear & Concise Description of Bug
The script doesn't load the prison_wear which is provided in the config.lua
I think the error is here:
Prison Clothing Menu
function PrisonClothingMenu()
ESX.UI.Menu.CloseAll()

ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'prisonclothing', {
    title = _U('clothing_menu'),
    align = GetConvar('esx_MenuAlign', 'top-left'),
    elements = {
        {label = _U('citizen_wear'), value = 'citizen_wear'},
        {label = _U('jail_wear'), value = 'jail_wear'},
}}, function(data, menu)
    local ped = GetPlayerPed(-1)
    menu.close()

    if data.current.value == 'citizen_wear' then
        ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jailSkin)
            TriggerEvent('skinchanger:loadSkin', skin)
        end)
    elseif data.current.value == 'jail_wear' then
        ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jailSkin)
            if skin.sex == 0 then
                SetPedComponentVariation(GetPlayerPed(-1), 3, 5, 0, 0) -- Gloves
                SetPedComponentVariation(GetPlayerPed(-1), 4, 9, 4, 0) -- Jeans
                SetPedComponentVariation(GetPlayerPed(-1), 6, 61, 0, 0) -- Shoes
                SetPedComponentVariation(GetPlayerPed(-1), 11, 5, 0, 0) -- Jacket
                SetPedComponentVariation(GetPlayerPed(-1), 8, 15, 0, 0) -- Yellow Vest

elseif skin.sex == 1 then
SetPedComponentVariation(GetPlayerPed(-1), 3, 14, 0, 0) -- Gloves
SetPedComponentVariation(GetPlayerPed(-1), 4, 3, 15, 0) -- Jeans
SetPedComponentVariation(GetPlayerPed(-1), 6, 52, 0, 0) -- Shoes
SetPedComponentVariation(GetPlayerPed(-1), 11, 73, 0, 0) -- Jacket
SetPedComponentVariation(GetPlayerPed(-1), 8, 14, 0, 0) -- Yellow Vest
else
TriggerEvent('skinchanger:loadClothes', skin, jailSkin.skin_female)
end
end)
end
end, function (data, menu)
menu.close()
end)
end
What do I need to put there so he pulls the wear from the config.lua?
Questions
Have you made changes to anything in client/main.lua or server/main.lua?: Yes, changed locations of prisons
Have you looked through the Closed Topics?: Yes
Have you looked through the Wiki?: Yes
Are you using a Pre-Installed ESX? If Yes who?: dont know, will look up
Are you using es_extended? If Yes what Version? (Example: 1.2): see above^
Are you using Essentialmode?: same as above
Are you using ExtendedMode?: same as above
Are you using OneSync?: same as above
Linux or Windows?: Windows

Not sure if you have this fixed or not but i would try using the same layout as whats in the config.lua. You will need to use help from skinchanger to get everything. For example what i do is i do /skin for esx_skin and i get the clothing info. Then you should be able to input that info into the config.lua

didn't really fix it.. Is there any other way?