[HELP] Change police skin by default

Hello! i added some police skins to my server…but i dont know how to change the skin by default when my players take service…this is the code

local hashSkin = GetHashKey("mp_m_freemode_01")
function giveUniforme()
	Citizen.CreateThread(function()
		TriggerServerEvent("police:setService",true)
		if(GetEntityModel(GetPlayerPed(-1)) == hashSkin) then
			
			SetPedPropIndex(GetPlayerPed(-1), 1, 5, 0, 2)             --Lunette Soleil
			SetPedPropIndex(GetPlayerPed(-1), 2, 0, 0, 2)             --Ecouteur Bluetooh
			SetPedComponentVariation(GetPlayerPed(-1), 11, 55, 0, 2)  --Chemise Police
			SetPedComponentVariation(GetPlayerPed(-1), 8, 58, 0, 2)   --Ceinture+matraque Police 
			SetPedComponentVariation(GetPlayerPed(-1), 4, 35, 0, 2)   --Pantalon Police
			SetPedComponentVariation(GetPlayerPed(-1), 6, 24, 0, 2)   --Chaussure Police
			SetPedComponentVariation(GetPlayerPed(-1), 10, 8, 0, 2)   --grade 0
			SetPedComponentVariation(GetPlayerPed(-1), 3, 0, 0, 2)   -- under skin
			
		else

			SetPedPropIndex(GetPlayerPed(-1), 1, 11, 3, 2)           --Lunette Soleil
			SetPedPropIndex(GetPlayerPed(-1), 2, 0, 0, 2)            --Ecouteur Bluetooh
			SetPedComponentVariation(GetPlayerPed(-1), 3, 14, 0, 2)  --Tshirt non bug
			SetPedComponentVariation(GetPlayerPed(-1), 11, 48, 0, 2) --Chemise Police
			SetPedComponentVariation(GetPlayerPed(-1), 8, 35, 0, 2)  --Ceinture+matraque Police 
			SetPedComponentVariation(GetPlayerPed(-1), 4, 34, 0, 2)  --Pantalon Police
			SetPedComponentVariation(GetPlayerPed(-1), 6, 29, 0, 2)  -- Chaussure Police
			SetPedComponentVariation(GetPlayerPed(-1), 10, 7, 0, 2)  --grade 0
			SetPedComponentVariation(GetPlayerPed(-1), 3, 0, 0, 2)   -- under skin
		
		end

But its like a pedvariation…someone knows how to change the default police skin to the sheriff skin for example? thanks!!

1 Like

https://github.com/Kyominii/Cops_FiveM/blob/master/police/vestpolice.lua#L141

use this example

And if i want to make a differente between genres? example…if you are a male “s_m_y_cop_01” and if u female “female uniform” PD: I use skin customization, maybe we can do something with mp_m_freemode_01 and mp_f_freemode_01, right?

You have some female skin model available

And for outfits, you have to search with Lambda (for example)

Error 404 I have been searching how to do this please point me in correct direction