Help with hash skins

Hi guys, can somebody help me? I want to make marker on which player will be able to set hash skin. I’ll be grateful for any help

1 Like

hmm


Same thing, trying to find out on how to create marker, where people with assigned role could insert hash number, and then use that skin. :thinking: seen this on another role play server.

Same thing, trying to find out on how to create marker, where people with assigned role could insert hash number, and then use that skin. :thinking: seen this on another role play server.

Well now i made it.

Hi guys, can somebody help me? I want to make marker on which player will be able to set hash skin. I’ll be grateful for any help

This is exactly what you want :slight_smile:

Type in Hash example: 1074457665
Type in Name example: a_m_m_hillbilly_02

Just change coords for your liking.

Citizen.CreateThread(function()
    while true do
        local sleepThread = 500

        local ped = PlayerPedId()
        local pedCoords = GetEntityCoords(ped)

        local dstCheck = GetDistanceBetweenCoords(pedCoords, -33.061138153076, -996.22265625, 29.22996711731, true)

        if dstCheck <= 10.0 then
            sleepThread = 5

            DrawMarker(2, -33.061138153076, -996.22265625, 29.22996711731, vector3(0.0, 0.0, 0.0), vector3(0.0, 0.0, 0.0), vector3(0.3, 0.3, 0.3), 255, 0, 0, 150)

			if dstCheck <= 0.5 then
				ShowHelpNotification("~INPUT_CONTEXT~ Change Ped Skin")

                if IsControlJustPressed(0, 38) then
                    ChangePedSkin()
                end
            end
        end

        Citizen.Wait(sleepThread)
    end
end)

ChangePedSkin = function()
    DisplayOnscreenKeyboard(1, "FMMC_MPM_NA", "", "", "", "", "", 10)

    while UpdateOnscreenKeyboard() == 0 do
        DisableAllControlActions(0)
        Wait(0)
    end
    
    if GetOnscreenKeyboardResult() then
        local pedHash = GetOnscreenKeyboardResult()

        if tonumber(pedHash) ~= nil then
            pedHash = tonumber(pedHash)
        else
            pedHash = GetHashKey(pedHash)
        end
 
        if IsModelInCdimage(pedHash) then
            RequestModel(pedHash)

            while not HasModelLoaded(pedHash) do
                Citizen.Wait(5)
            end

			SetPlayerModel(PlayerId(), pedHash)

			ShowNotification("Ped Changed.")
		else
			ShowNotification("This does not exist.")
        end
    end
end

ShowNotification = function(msg)
	SetNotificationTextEntry('STRING')
	AddTextComponentSubstringPlayerName(msg)
	DrawNotification(false, true)
end

ShowHelpNotification = function(msg)
	BeginTextCommandDisplayHelp('STRING')
	AddTextComponentSubstringPlayerName(msg)
	EndTextCommandDisplayHelp(0, false, true, -1)
end
2 Likes