# PLAYER::SET_LOCKON_TO_FRIENDLY_PLAYERS

- **Hash:** `0x4A056257802DD3E5`
- **Namespace:** PLAYER
- **Runtime name (Lua/JS):** `SetLockonToFriendlyPlayers`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** named only
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/PLAYER/SET_LOCKON_TO_FRIENDLY_PLAYERS

## Signature

```c
void SET_LOCKON_TO_FRIENDLY_PLAYERS(Player player, BOOL toggle);
```

## Parameters

- `player` (`Player`)
- `toggle` (`BOOL`)

## Returns

`void`

## Usage

### Lua

```lua
SetLockonToFriendlyPlayers(player, toggle)

-- always available, by hash
Citizen.InvokeNative(0x4A056257802DD3E5, player, toggle)
```

### JavaScript

```js
SetLockonToFriendlyPlayers(player, toggle);

// by hash
Citizen.invokeNative('0x4A056257802DD3E5', player, toggle);
```

### C#

```csharp
Function.Call((Hash)0x4A056257802DD3E5, player, toggle);
```

*Sources: alloc8or RDR3 NativeDB.*
