# PED::_SET_PED_MELEE_ACTION

- **Hash:** `0xC48AF420371C7407`
- **Namespace:** PED
- **Runtime name (Lua/JS):** `SetPedMeleeAction`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **Other names:** `_SET_PED_NEXT_MELEE_ATTACK`
- **URL:** https://natives.borderlinerp.com/natives/PED/_SET_PED_MELEE_ACTION

## Signature

```c
BOOL _SET_PED_MELEE_ACTION(Ped ped, Hash actionHash);
```

## Parameters

- `ped` (`Ped`)
- `actionHash` (`Hash`)

## Returns

`BOOL`

## Description

*Source: 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.

*Source: 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

```lua
local retval = SetPedMeleeAction(ped, actionHash)

-- always available, by hash
local retval = Citizen.InvokeNative(0xC48AF420371C7407, ped, actionHash, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const retval = SetPedMeleeAction(ped, actionHash);

// by hash
const retval = Citizen.invokeNative('0xC48AF420371C7407', ped, actionHash, Citizen.returnResultAnyway());
```

### C#

```csharp
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.*
