GetPedDecorations returning incorrect hash values

  1. Versions: Client 6114/beta, FXServer 6117, GTA 2699
  2. Expectation: Expecting GetPedDecorations to return the same hash as used to apply decorations in AddPedDecorationFromHashes
  3. Reality: GetPedDecorations returns the unsigned version of the correct hash
  4. Category: Ped natives
  5. Repro code:
Citizen.CreateThread(function()
  ClearPedDecorations(PlayerPedId())

  AddPedDecorationFromHashes(PlayerPedId(), `mpbeach_overlays`, `FM_Hair_Fuzz`)  

  print('Expecting decoration', `mpbeach_overlays`, `FM_Hair_Fuzz`)

  for _, decoration in pairs(GetPedDecorations(PlayerPedId())) do
    print('Got decoration', decoration[1], decoration[2])
  end
end)

Output of above:

Expecting decoration	-1719270477	-1824026490
Got decoration	2575696819	2470940806

Classic signed vs unsigned issue.

-1719270477 is signed, converting it to unsigned -1719270477 >>> 0 = 2575696819

-1824026490-1824026490 >>> 0 = 2470940806

We can’t know if you expect signed or unsigned hashes. In the game hashes are unsigned. But ScRTs can’t know if returned game value was meant to be signed or unsigned. So you can just always convert it to unsigned to avoid such issues.