RedM Natives

_HUD_CHECK_CLOSEST_HORSE

Returns closest horse entity handle (about 3 meters; facing, directly riding, etc).

Hash0x0501D52D24EA8934
Runtime nameHudCheckClosestHorse
NamespaceHUD
SideClient
NameCommunity guess
Docs
Since build1207
Also known as_GET_NEAR_HORSE

Signature

Entity _HUD_CHECK_CLOSEST_HORSE(BOOL p0);

Parameters

NameTypeDescription
p0BOOL—

Returns Entity

Description

alloc8or RDR3 NativeDB

Returns closest horse entity handle (about 3 meters; facing, directly riding, etc).
Maybe when horse hud interaction prompts are allowed to show (?)

Params: p0 is usually true, if its false the native returns the players ped handle (?)

_HIDE_* - _IGNORE_*

VORPCORE RDR3natives

This native accepts 1 as parameter in the decompiles
returns the nearest horse handle if within 2 3 meters of the player, if not close enough returns false

NOTE: if type is 0 returns PlayerPedId always?

femga rdr3_discoveries · research notes

0x0501d52d24ea8934 (by aaron1a12)
Seems to return horse ped when really close (facing, directly riding, etc)
Maybe when horse interaction prompts are allowed to show?

N_0x0501d52d24ea8934(1)

Usage

Lua
local retval = HudCheckClosestHorse(p0)

-- always works, by hash
local retval = Citizen.InvokeNative(0x0501D52D24EA8934, p0, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = HudCheckClosestHorse(p0);

// by hash
const retval = Citizen.invokeNative('0x0501D52D24EA8934', p0, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x0501D52D24EA8934, p0);
  • 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.

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives · femga rdr3_discoveries

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