{"hash":"0x7AE93C45EC14A166","ns":"PLAYER","name":"_GET_PLAYER_FREE_AIM_CLOSEST_ENTITY","slug":"_GET_PLAYER_FREE_AIM_CLOSEST_ENTITY","official":false,"named":true,"luaName":"GetPlayerFreeAimClosestEntity","game":"rdr3","apiset":"client","returnType":"BOOL","params":[{"name":"player","type":"Player"},{"name":"entity","type":"Entity*"}],"summary":"Returns true if any entity have been found closest to where the player is aiming at (like 5m max far).","descriptions":[{"source":"alloc8or","format":"text","body":"Returns true if any entity have been found closest to where the player is aiming at (like 5m max far). Seems to only work on human peds\n\nParameters:\n- entity: Entity* - Pointer of closest entity.\n\nReturns:\n- success: bool - True if entity found, false otherwise.\n\nExample video:\n- https://imgur.com/a/JiqTmYl"},{"source":"vorp","format":"text","body":"Only used in script function PROCESS_PED_INTERRUPT_DIALOGUE\n_GET_PLAYER_*"}],"examples":[],"aliases":[],"enums":[],"related":[],"build":"1207","sources":["alloc8or","vorp"],"doc":2,"url":"https://natives.borderlinerp.com/natives/PLAYER/_GET_PLAYER_FREE_AIM_CLOSEST_ENTITY","markdownUrl":"https://natives.borderlinerp.com/natives/PLAYER/_GET_PLAYER_FREE_AIM_CLOSEST_ENTITY.md","snippets":{"lua":"local retval, entity = GetPlayerFreeAimClosestEntity(player, entity)","luaInvoke":"local retval, entity = Citizen.InvokeNative(0x7AE93C45EC14A166, player, Citizen.PointerValueIntInitialized(entity), Citizen.ReturnResultAnyway())","js":"const [retval, entity] = GetPlayerFreeAimClosestEntity(player, entity);","jsInvoke":"const [retval, entity] = Citizen.invokeNative('0x7AE93C45EC14A166', player, Citizen.pointerValueIntInitialized(entity), Citizen.returnResultAnyway());","csharp":"var entity = new OutputArgument();\nbool retval = Function.Call<bool>((Hash)0x7AE93C45EC14A166, player, entity);\n// entity.GetResult<int>()","notes":["The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.","The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works."]}}