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!!