RedM Natives

GET_PLAYER_MAX_HEALTH

Hash0x8154E470
Runtime nameGetPlayerMaxHealth
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

int GET_PLAYER_MAX_HEALTH(char* playerSrc);

Parameters

NameTypeDescription
playerSrcchar*

The player handle

Returns int

Usage

Lua
local retval = GetPlayerMaxHealth(playerSrc)

-- always works, by hash
local retval = Citizen.InvokeNative(0x8154e470, playerSrc, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetPlayerMaxHealth(playerSrc);

// by hash
const retval = Citizen.invokeNative('0x8154e470', playerSrc, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x8154e470, playerSrc);

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.