fivem-appearance icon indicating copy to clipboard operation
fivem-appearance copied to clipboard

Job clothes

Open RebornOG opened this issue 3 years ago • 3 comments

Changing outfit in jobs for example police and ambulance doesnt work. Whats the implementation to those to make it work ?

RebornOG avatar Jan 10 '22 11:01 RebornOG

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 ?

vicciusomerta avatar Jan 20 '22 00:01 vicciusomerta

even i want the same answer

SYNO-SY avatar Feb 08 '22 08:02 SYNO-SY

Hi, I know I'm a bit late but here's the solution that I found

kangoka avatar Oct 06 '22 23:10 kangoka