_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,…
Hash
0xAC22AA6DF4D1C1DERuntime name
AddPlayerAsFollowTargetNamespacePLAYER
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
| Name | Type | Description |
|---|---|---|
player | Player | — |
ped | Ped | — |
p2 | float | — |
p3 | float | — |
followMode | int | — |
followPriority | int | — |
p6 | BOOL | — |
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
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#
AddPlayerAsFollowTarget(player, ped, p2, p3, followMode, followPriority, p6);
// by hash
Citizen.invokeNative('0xAC22AA6DF4D1C1DE', player, ped, p2 + 0.0000001, p3 + 0.0000001, followMode, followPriority, p6);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. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to 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
InvokeNativewith the hash — it always works.
See also
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.