fivem-appearance
fivem-appearance copied to clipboard
Job clothes
Changing outfit in jobs for example police and ambulance doesnt work. Whats the implementation to those to make it work ?
We have to use the exports but i have no clue what i actually need to replace...i've tried couple of things but no luck
For example my taxi job cloack :
function OpenCloakroom() ESX.UI.Menu.CloseAll()
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'taxi_cloakroom', {
title = _U('cloakroom_menu'),
align = 'top-left',
elements = {
{label = _U('wear_citizen'), value = 'wear_citizen'},
{label = _U('wear_work'), value = 'wear_work'}
}}, function(data, menu)
if data.current.value == 'wear_citizen' then
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin)
TriggerEvent('skinchanger:loadSkin', skin)
end)
elseif data.current.value == 'wear_work' then
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin)
if skin.sex == 0 then
TriggerEvent('skinchanger:loadClothes', skin, jobSkin.skin_male)
else
TriggerEvent('skinchanger:loadClothes', skin, jobSkin.skin_female)
end
end)
end
end, function(data, menu)
menu.close()
CurrentAction = 'cloakroom'
CurrentActionMsg = _U('cloakroom_prompt')
CurrentActionData = {}
end)
end
And these are the exports :
ESX.TriggerServerCallback('fivem-appearance:getPlayerSkin', function(appearance) exports['fivem-appearance']:setPlayerAppearance(appearance) end)
What do i have to replace exactly ?
even i want the same answer
Hi, I know I'm a bit late but here's the solution that I found