feat(extra-natives-rdr3): add `GET_PED_SCALE` `GET_PED_WETNESS` `GET_PED_WETNESS_HEIGHT` for RedM
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 can you squash the commits please.
2 commits there looks fine
11212112
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
When?
Developers like me awaiting such features. Commit is Merge ready why not merged ?
Already 2 Weeks over again, please merge it! Thank you!
@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!
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).
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 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