SetPlayerHealthRechargeMultiplier
DocsSetPlayerHealthRechargeMultiplier(player, regenRate)Description
This multiplier is reset to 1.0 every time the player ped is changed, often times via <code>SET_PLAYER_MODEL</code> or <code>CHANGE_PLAYER_PED</code>.
Parameters
| Name | Type | Description |
|---|---|---|
player | Player | The local player ID, see [PLAYER_ID](#\_0x4F8644AF03D0E0D6). |
regenRate | float | The recharge multiplier, this value needs to be a positive float value to work. |
Quick Snippet: Get Playerplayer
playerUse this to get the local player ID or a target player's server ID.
-- Get the local player index (client-side)
local playerId = PlayerId()
-- Get the local player's server ID (for server events)
local serverId = GetPlayerServerId(playerId)
print("Player ID: " .. playerId)
print("Server ID: " .. serverId)
-- Get player ped from a server ID:
-- local targetPed = GetPlayerPed(GetPlayerFromServerId(targetServerId))Returns
voidThis native does not return a value.
Examples
Official
-- To disable the health recharge completely:
SetPlayerHealthRechargeMultiplier(PlayerId(), 0.0)
-- To reset it back to the normal recharge speed:
SetPlayerHealthRechargeMultiplier(PlayerId(), 1.0)