_SET_PED_MELEE_ACTION
Requests a specific melee action, grapple move, or execution for the ped's next valid melee opportunity.
0xC48AF420371C7407SetPedMeleeAction_SET_PED_NEXT_MELEE_ATTACKSignature
BOOL _SET_PED_MELEE_ACTION(Ped ped, Hash actionHash);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
actionHash | Hash | — |
Returns BOOL
Description
Requests a specific melee action, grapple move, or execution for the ped's next valid melee opportunity.
The actionHash is resolved from the internal AR_* action table, such as AR_GRAPPLE_EXECUTION or AR_GRAPPLE_FRONT_FROM_FRONT.
Returns false if the ped is invalid, not in a valid gameplay state, has no melee intelligence task, or the action hash is not registered.
Sets the next melee attack of a ped eg AR_ATTACK_HAYMAKER_TO_HEAD_RIGHT_HAND_DIST_MED_V01 AR_GRAPPLE_MOUNT_FACEDOWN_FROM_FRONT
Usage
local retval = SetPedMeleeAction(ped, actionHash)
-- always works, by hash
local retval = Citizen.InvokeNative(0xC48AF420371C7407, ped, actionHash, Citizen.ReturnResultAnyway())JavaScript and C#
const retval = SetPedMeleeAction(ped, actionHash);
// by hash
const retval = Citizen.invokeNative('0xC48AF420371C7407', ped, actionHash, Citizen.returnResultAnyway());bool retval = Function.Call<bool>((Hash)0xC48AF420371C7407, ped, actionHash);- Hash parameters: the named function also accepts a string and hashes it for you;
Citizen.InvokeNativeneeds the number — passjoaat("name")or a backtick literal like`name`. - 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.
Sources
alloc8or RDR3 NativeDB · VORPCORE RDR3natives
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.