citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.41k stars 2.01k forks source link

Server side RPC native `SetPedHairColor` doesn't exist #2549

Closed xlogic1992 closed 1 month ago

xlogic1992 commented 2 months ago

What happened?

Updated to the latest version of the server 8187 and the native no longer exists.

When looking at the documention for the client sided which still has SetPedHairColor (Ref: 0xBB43F090) and clicking the link to the server side version it takes me to SetPedHairTint (Ref: 0x4CFFC65454C93A49) however when using this too, it gives the same error about not existing.

image

image

Expected result

To be able to set the player hair colour from the server side without crashing.

Reproduction steps

  1. Download the latest version of the server or version 8187
  2. Try setting the ped hair colour server side using SetPedHairColor(index, colour, highlight) or SetPedHairTint(index, color, highlight)

Importancy

Crash

Area(s)

FXServer, OneSync

Specific version(s)

Server 8187 on both linux and windows

Additional information

Seems to be an issue with all artifacts from the last two or three months.

KRWerk commented 2 months ago

I can confirm this bug for "SetPedHairColor" ( https://docs.fivem.net/natives/?_0xBB43F090 )

Server Command to reproduce it:

RegisterCommand("setHairColor", function(source, args, rawCommand)
    if (source > 0) then
        local ped = GetPlayerPed(source)
        local color = tonumber(args[1])
        local highlight = tonumber(args[2])

        if not color or not highlight then
            print("Usage: /setHairColor [color] [highlight]")
            return
        end

        print(string.format('[Hair] Color ID: %s Highlight ID: %s', color, highlight))
        SetPedHairColor(ped, color, highlight)
    end
end, false)
DonPoedel commented 2 months ago

I can also confirm this bug.

https://github.com/citizenfx/fivem/issues/2447