{"hash":"0x0501D52D24EA8934","ns":"HUD","name":"_HUD_CHECK_CLOSEST_HORSE","slug":"_HUD_CHECK_CLOSEST_HORSE","official":false,"named":true,"luaName":"HudCheckClosestHorse","game":"rdr3","apiset":"client","returnType":"Entity","params":[{"name":"p0","type":"BOOL"}],"summary":"Returns closest horse entity handle (about 3 meters; facing, directly riding, etc).","descriptions":[{"source":"alloc8or","format":"text","body":"Returns closest horse entity handle (about 3 meters; facing, directly riding, etc).\nMaybe when horse hud interaction prompts are allowed to show (?)\n\nParams: p0 is usually true, if its false the native returns the players ped handle (?)\n\n_HIDE_* - _IGNORE_*"},{"source":"vorp","format":"text","body":"This native accepts 1 as parameter in the decompiles\nreturns the nearest horse handle if within 2 3 meters of the player, if not close enough returns false\n\nNOTE: if type is 0 returns PlayerPedId always?"},{"source":"femga","format":"pre","body":"0x0501d52d24ea8934 (by aaron1a12)\nSeems to return horse ped when really close (facing, directly riding, etc)\nMaybe when horse interaction prompts are allowed to show?\n\nN_0x0501d52d24ea8934(1)"}],"examples":[],"aliases":["_GET_NEAR_HORSE"],"enums":[],"related":[],"build":"1207","sources":["alloc8or","vorp","femga"],"doc":2,"url":"https://natives.borderlinerp.com/natives/HUD/_HUD_CHECK_CLOSEST_HORSE","markdownUrl":"https://natives.borderlinerp.com/natives/HUD/_HUD_CHECK_CLOSEST_HORSE.md","snippets":{"lua":"local retval = HudCheckClosestHorse(p0)","luaInvoke":"local retval = Citizen.InvokeNative(0x0501D52D24EA8934, p0, Citizen.ResultAsInteger())","js":"const retval = HudCheckClosestHorse(p0);","jsInvoke":"const retval = Citizen.invokeNative('0x0501D52D24EA8934', p0, Citizen.returnResultAnyway(), Citizen.resultAsInteger());","csharp":"int retval = Function.Call<int>((Hash)0x0501D52D24EA8934, p0);","notes":["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."]}}