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
Hash
0x27F89FDC16688A7ARuntime name
IsPlayerTargettingEntityNamespacePLAYER
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x7912F7FC4F6264B6Signature
BOOL IS_PLAYER_TARGETTING_ENTITY(Player player, Entity entity, BOOL withWeapon);Parameters
| Name | Type | Description |
|---|---|---|
player | Player | — |
entity | Entity | — |
withWeapon | BOOL | — |
Returns BOOL
Description
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
local retval = IsPlayerTargettingEntity(player, entity, withWeapon)
-- always works, by hash
local retval = Citizen.InvokeNative(0x27F89FDC16688A7A, player, entity, withWeapon, Citizen.ReturnResultAnyway())JavaScript and C#
const retval = IsPlayerTargettingEntity(player, entity, withWeapon);
// by hash
const retval = Citizen.invokeNative('0x27F89FDC16688A7A', player, entity, withWeapon, Citizen.returnResultAnyway());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.