fivem
fivem copied to clipboard
[REDM] IsPedCuffed Incorrect Retval
What happened?
The native at first glance appears to be correct, however if a ped is hogtied, then killed it returns the value of 1 (true), even if they are not actually handcuffed.
Video: https://streamable.com/8iwfdo
For clarity; this native appears to work correctly UNTIL the ped in question is hogtied then killed, in which it will return '1' regardless of if the ped is actually handcuffed (SetEnableHandcuffs / 0xDF1AF8B5D56542FA)
Expected result
This native should return FALSE if the ped is not handcuffed. Even if hogtied and dead
Reproduction steps
- Create a command (or use runcode) that prints IsPedCuffed(PlayerPedId()):
RegisterCommand('p', function() print(IsPedCuffed(PlayerPedId())) end, false)
- Run it while alive, not hogtied, not handcuffed, it will return false, as it should.
- Once alive again, have a nearby npc ped hogtie your ped or have another player hogtie you.
- Once hogtied, run your command again and you will get a return of '1' (true)
You can also create a command to set your ped as handcuffed to test the native's retval. From my testing it works as expected UNTIL the ped in question is hogtied and dead, in which it returns '1' instead of false.
Importancy
Unknown
Area(s)
RedM, Natives
Specific version(s)
RedM 1491
Additional information
No response