Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tweak(natives/player): document that the recharge multiplier gets reset on player ped change #1156

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions PLAYER/SetPlayerHealthRechargeMultiplier.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ ns: PLAYER
void SET_PLAYER_HEALTH_RECHARGE_MULTIPLIER(Player player, float regenRate);
```

This multiplier is reset to `1.0` every time the player ped is changed, often times via [`SET_PLAYER_MODEL`](#_0x00A1CADD00108836) or [`CHANGE_PLAYER_PED`](#_0x048189FAC643DEEE).

## Parameters
* **player**: The local player ID, see [PLAYER_ID](#_0x4F8644AF03D0E0D6).
* **regenRate**: The recharge multiplier, this value needs to be a positive float value to work.

## Examples
```lua
-- To disable the health recharge completely:
Expand All @@ -17,6 +23,3 @@ SetPlayerHealthRechargeMultiplier(PlayerId(), 0.0)
SetPlayerHealthRechargeMultiplier(PlayerId(), 1.0)
```

## Parameters
* **player**: The local player ID.
* **regenRate**: The recharge multiplier, a value between 0.0 and 1.0.
Loading