_CHANGE_PED_STAMINA
Alters entity's stamina by 'amount'.
Hash
0xC3D4B754C0E86B9ERuntime name
ChangePedStaminaNamespacePED
SideClient
NameCommunity guess
Docs
Since build1207
Signature
BOOL _CHANGE_PED_STAMINA(Ped ped, float amount);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
amount | float | — |
Returns BOOL
Description
Alters entity's stamina by 'amount'. Can be negative (to drain stamina). float amount: -1000.0 - 1000.0
Usage
local retval = ChangePedStamina(ped, amount)
-- always works, by hash
local retval = Citizen.InvokeNative(0xC3D4B754C0E86B9E, ped, amount, Citizen.ReturnResultAnyway())JavaScript and C#
const retval = ChangePedStamina(ped, amount);
// by hash
const retval = Citizen.invokeNative('0xC3D4B754C0E86B9E', ped, amount + 0.0000001, Citizen.returnResultAnyway());bool retval = Function.Call<bool>((Hash)0xC3D4B754C0E86B9E, ped, amount);- Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason. - The name is a community guess and may change. If the named call is missing in your client build, use
InvokeNativewith the hash — it always works.
See also
_GET_PED_STAMINA_RESET_PED_STAMINA_RESTORE_PED_STAMINA0.0 <= stamina <= 100.0
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.