_GET_PED_MOTIVATION
If targetPed is set to 0 the ped motivationState affects everyone
Hash
0x42688E94E96FD9B4Runtime name
GetPedMotivationNamespacePED
SideClient
NameCommunity guess
Docs
Since build1207
Signature
float _GET_PED_MOTIVATION(Ped ped, int motivationState, Ped targetPed);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
motivationState | int | — |
targetPed | Ped | — |
Returns float
Description
If targetPed is set to 0 the ped motivationState affects everyone
Usage
local retval = GetPedMotivation(ped, motivationState, targetPed)
-- always works, by hash
local retval = Citizen.InvokeNative(0x42688E94E96FD9B4, ped, motivationState, targetPed, Citizen.ResultAsFloat())JavaScript and C#
const retval = GetPedMotivation(ped, motivationState, targetPed);
// by hash
const retval = Citizen.invokeNative('0x42688E94E96FD9B4', ped, motivationState, targetPed, Citizen.returnResultAnyway(), Citizen.resultAsFloat());float retval = Function.Call<float>((Hash)0x42688E94E96FD9B4, ped, motivationState, targetPed);- 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.
Enums and flags
- PedMotivationState 11 values
See also
_SET_PED_MOTIVATIONTOILET_STATE, FEAR_STATE, ANGRY_STATE, AGITATION_STATE, HUNGRY_STATE, TIRED_STATE, SAD_STATE, BRAVE_STATE, OFFER_ITEM_STATE, SUSPICION, DRUNK_STATE If targetPed is set to 0 the ped motivationState affects everyone
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.