RedM Natives

_ADD_PLAYER_AS_FOLLOW_TARGET

Used in script function: NET_AUTO_FOLLOW_UPDATE_LEADER_VALUES HORSEFOLLOWMODE_SIDE_ONLY, HORSEFOLLOWMODE_BEHIND_ONLY, HORSEFOLLOWMODE_BEHIND_AND_SIDE, HORSEFOLLOWMODE_BEHIND_CLOSE HORSEFOLLOWPRIORITY_AMBIENT, HORSEFOLLOWPRIORITY_NORMAL,…

Hash0xAC22AA6DF4D1C1DE
Runtime nameAddPlayerAsFollowTarget
NamespacePLAYER
SideClient
NameCommunity guess
Docs
Since build1207

Signature

void _ADD_PLAYER_AS_FOLLOW_TARGET(Player player, Ped ped, float p2, float p3, int followMode, int followPriority, BOOL p6);

Parameters

NameTypeDescription
playerPlayer—
pedPed—
p2float—
p3float—
followModeint—
followPriorityint—
p6BOOL—

Returns void

Description

Used in script function: NET_AUTO_FOLLOW_UPDATE_LEADER_VALUES
followMode:
HORSEFOLLOWMODE_AUTO = 0,
HORSEFOLLOWMODE_SIDE_ONLY,
HORSEFOLLOWMODE_BEHIND_ONLY,
HORSEFOLLOWMODE_BEHIND_AND_SIDE,
HORSEFOLLOWMODE_BEHIND_CLOSE
followPriority:
HORSEFOLLOWPRIORITY_STEER_ASSIST = 0,
HORSEFOLLOWPRIORITY_AMBIENT,
HORSEFOLLOWPRIORITY_NORMAL,
HORSEFOLLOWPRIORITY_HIGH

Usage

Lua
AddPlayerAsFollowTarget(player, ped, p2, p3, followMode, followPriority, p6)

-- always works, by hash
Citizen.InvokeNative(0xAC22AA6DF4D1C1DE, player, ped, p2, p3, followMode, followPriority, p6)
JavaScript and C#
JavaScript
AddPlayerAsFollowTarget(player, ped, p2, p3, followMode, followPriority, p6);

// by hash
Citizen.invokeNative('0xAC22AA6DF4D1C1DE', player, ped, p2 + 0.0000001, p3 + 0.0000001, followMode, followPriority, p6);
C#
Function.Call((Hash)0xAC22AA6DF4D1C1DE, player, ped, p2, p3, followMode, followPriority, p6);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.
  • 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.

See also

Sources

alloc8or RDR3 NativeDB

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