RedM Natives

IS_PLAYER_TARGETTING_ENTITY

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

Hash0x27F89FDC16688A7A
Runtime nameIsPlayerTargettingEntity
NamespacePLAYER
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x7912F7FC4F6264B6

Signature

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

Parameters

NameTypeDescription
playerPlayer—
entityEntity—
withWeaponBOOL—

Returns BOOL

Description

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
local retval = IsPlayerTargettingEntity(player, entity, withWeapon)

-- always works, by hash
local retval = Citizen.InvokeNative(0x27F89FDC16688A7A, player, entity, withWeapon, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = IsPlayerTargettingEntity(player, entity, withWeapon);

// by hash
const retval = Citizen.invokeNative('0x27F89FDC16688A7A', player, entity, withWeapon, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0x27F89FDC16688A7A, player, entity, withWeapon);

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

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