GET_PLAYER_TARGET_ENTITY
Hash
0xAE663DDD99C8A670Runtime name
GetPlayerTargetEntityNamespacePLAYER
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x13EDE1A5DBF797C9Signature
BOOL GET_PLAYER_TARGET_ENTITY(Player player, Entity* entity);Parameters
| Name | Type | Description |
|---|---|---|
player | Player | — |
entity | Entity* | — |
Returns BOOL
Usage
local retval, entity = GetPlayerTargetEntity(player, entity)
-- always works, by hash
local retval, entity = Citizen.InvokeNative(0xAE663DDD99C8A670, player, Citizen.PointerValueIntInitialized(entity), Citizen.ReturnResultAnyway())JavaScript and C#
const [retval, entity] = GetPlayerTargetEntity(player, entity);
// by hash
const [retval, entity] = Citizen.invokeNative('0xAE663DDD99C8A670', player, Citizen.pointerValueIntInitialized(entity), Citizen.returnResultAnyway());var entity = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0xAE663DDD99C8A670, player, entity);
// entity.GetResult<int>()- The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.