fivem icon indicating copy to clipboard operation
fivem copied to clipboard

feat(extra-natives-rdr3): add `GET_PED_SCALE` `GET_PED_WETNESS` `GET_PED_WETNESS_HEIGHT` for RedM

Open Ktos93 opened this issue 9 months ago • 2 comments

Goal of this PR

Introduce a new native function GET_PED_SCALE that allows retrieving the current scale of a ped, supporting both meta and non-meta peds.

How is this PR achieving the goal

The PR registers a new native function GET_PED_SCALE that retrieves a ped's scale by accessing internal component data. It safely handles both meta and non-meta peds by resolving the correct memory paths and applying necessary type checks.

This PR applies to the following area(s)

RedM

Successfully tested on

Game builds: 1491

Platforms: Windows

Checklist

  • [x] Code compiles and has been tested successfully.
  • [x] Code explains itself well and/or is documented.
  • [x] My commit message explains what the changes do and what they are for.
  • [x] No extra compilation warnings are added by these changes.

Fixes issues

Ktos93 avatar Apr 09 '25 08:04 Ktos93

@Ktos93 can you squash the commits please.

outsider31000 avatar May 17 '25 02:05 outsider31000

2 commits there looks fine

Ktos93 avatar May 17 '25 08:05 Ktos93

11212112

fares12121212122121212 avatar Jul 18 '25 12:07 fares12121212122121212

gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325gh pr checkout 3325

fares12121212122121212 avatar Jul 18 '25 12:07 fares12121212122121212

When?

Ktos93 avatar Sep 01 '25 18:09 Ktos93

Developers like me awaiting such features. Commit is Merge ready why not merged ?

DaNeo61 avatar Sep 12 '25 14:09 DaNeo61

Already 2 Weeks over again, please merge it! Thank you!

DaNeo61 avatar Sep 27 '25 08:09 DaNeo61

@Nobelium-cfx, hey sorry that i tag you.

Could you check and review this, i would wish my self this kind of native extras for some cool ideas with the wetness.

Thank you in advance, for the community!

DaNeo61 avatar Oct 10 '25 07:10 DaNeo61

Thank you for the contribution. For next PRs with new features I would like to see real world examples how it can be used. I can imaging how to use ped scale getter, but not wetness thing, so please next time provide possible usecases (in any gamemode, not only RP).

prikolium-cfx avatar Oct 13 '25 12:10 prikolium-cfx

Thank you for the contribution. For next PRs with new features I would like to see real world examples how it can be used. I can imaging how to use ped scale getter, but not wetness thing, so please next time provide possible usecases (in any gamemode, not only RP).

The functions GetPedWetness and GetPedWetnessHeight can be effectively used for a custom weapon maintenance script, allowing weapons to degrade faster depending on the wetness level unlike the default behavior in RDR2. This wouldn’t only be useful for roleplay scenarios but also for PvP gamemodes, where having weapons deteriorate could encourage players to switch equipment more often.

This is just one example, but I believe RP should also gain access to features that are normally not possible, especially given the size and creativity of the community. It could even enable systems like illnesses influenced by humidity (Wetness) levels.

Thank you for your efforts and for accepting the merge.

DaNeo61 avatar Oct 14 '25 06:10 DaNeo61

Thank you for the contribution. For next PRs with new features I would like to see real world examples how it can be used. I can imaging how to use ped scale getter, but not wetness thing, so please next time provide possible usecases (in any gamemode, not only RP).

The functions GetPedWetness and GetPedWetnessHeight can be effectively used for a custom weapon maintenance script, allowing weapons to degrade faster depending on the wetness level unlike the default behavior in RDR2. This wouldn’t only be useful for roleplay scenarios but also for PvP gamemodes, where having weapons deteriorate could encourage players to switch equipment more often.

This is just one example, but I believe RP should also gain access to features that are normally not possible, especially given the size and creativity of the community. It could even enable systems like illnesses influenced by humidity (Wetness) levels.

Thank you for your efforts and for accepting the merge.

Thank you for the explanation. That makes sense for me now

prikolium-cfx avatar Oct 14 '25 08:10 prikolium-cfx