RedM Natives

_SET_PED_MELEE_ACTION

Requests a specific melee action, grapple move, or execution for the ped's next valid melee opportunity.

Hash0xC48AF420371C7407
Runtime nameSetPedMeleeAction
NamespacePED
SideClient
NameCommunity guess
Docs
Since build1207
Also known as_SET_PED_NEXT_MELEE_ATTACK

Signature

BOOL _SET_PED_MELEE_ACTION(Ped ped, Hash actionHash);

Parameters

NameTypeDescription
pedPed—
actionHashHash—

Returns BOOL

Description

alloc8or RDR3 NativeDB

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.

VORPCORE RDR3natives

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

Lua
local retval = SetPedMeleeAction(ped, actionHash)

-- always works, by hash
local retval = Citizen.InvokeNative(0xC48AF420371C7407, ped, actionHash, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = SetPedMeleeAction(ped, actionHash);

// by hash
const retval = Citizen.invokeNative('0xC48AF420371C7407', ped, actionHash, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0xC48AF420371C7407, ped, actionHash);
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("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 InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

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