# PLAYER::IS_PLAYER_TARGETTING_ENTITY

- **Hash:** `0x27F89FDC16688A7A`
- **Namespace:** PLAYER
- **Runtime name (Lua/JS):** `IsPlayerTargettingEntity`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/PLAYER/IS_PLAYER_TARGETTING_ENTITY

## Signature

```c
BOOL IS_PLAYER_TARGETTING_ENTITY(Player player, Entity entity, BOOL withWeapon);
```

## Parameters

- `player` (`Player`)
- `entity` (`Entity`)
- `withWeapon` (`BOOL`)

## Returns

`BOOL`

## Description

*Source: VORPCORE RDR3natives*

p2 will return true if player is targetting entity with a weapon if false will return true if player is targetting entity without a weapon

## Usage

### Lua

```lua
local retval = IsPlayerTargettingEntity(player, entity, withWeapon)

-- always available, by hash
local retval = Citizen.InvokeNative(0x27F89FDC16688A7A, player, entity, withWeapon, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const retval = IsPlayerTargettingEntity(player, entity, withWeapon);

// by hash
const retval = Citizen.invokeNative('0x27F89FDC16688A7A', player, entity, withWeapon, Citizen.returnResultAnyway());
```

### C#

```csharp
bool retval = Function.Call<bool>((Hash)0x27F89FDC16688A7A, player, entity, withWeapon);
```

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
