# PED::_SET_PED_FIRING_PATTERN_2

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

## Signature

```c
void _SET_PED_FIRING_PATTERN_2(Ped ped, Hash patternHash);
```

## Parameters

- `ped` (`Ped`)
- `patternHash` (`Hash`)

## Returns

`void`

## Description

Used in R* MP Script fm_mission_controller and various R* SP Scripts for ambush*

## Usage

### Lua

```lua
SetPedFiringPattern_2(ped, patternHash)

-- always available, by hash
Citizen.InvokeNative(0x20E54854DEF6A54A, ped, patternHash)
```

### JavaScript

```js
SetPedFiringPattern_2(ped, patternHash);

// by hash
Citizen.invokeNative('0x20E54854DEF6A54A', ped, patternHash);
```

### C#

```csharp
Function.Call((Hash)0x20E54854DEF6A54A, ped, patternHash);
```

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