RedM Natives

TASK_MOUNT_ANIMAL

Flags will still apply to mountStyle

Hash0x92DB0739813C5186
Runtime nameTaskMountAnimal
NamespaceTASK
SideClient
NameOfficial
Docs
Since build1207

Signature

void TASK_MOUNT_ANIMAL(Ped ped, Ped mount, int timer, int seatIndex, float pedSpeed, int mountStyle, Any p6, Any p7);

Parameters

NameTypeDescription
pedPed—
mountPed—
timerint—
seatIndexint—
pedSpeedfloat—
mountStyleint—
p6Any—
p7Any—

Returns void

Description

alloc8or RDR3 NativeDB

timer: in ms, if it reaches 0 it will auto warp the ped on the horse
mountStyle: See TASK_ENTER_VEHICLE
Flags will still apply to mountStyle

femga rdr3_discoveries · research notes

// 0x92DB0739813C5186    (By Maniac)
TASK_MOUNT_ANIMAL(Ped ped, Ped mount, int timer, int position, float ped_speed, int mount_style, float unk1, float unk2)

mount_styles enum {
     normal = 1,
     backfirst = 8,
     warptohorse = 16,
 }

// timer: Timer in ms, if it reaches 0 it will auto warp the ped to the horse
// position: -1: main seat on horse, 0: back of horse
// ped_speed: How fast the ped will go
// mount_style: changes the way the ped gets on the horse (1, 8, 131072, 73, 1025, 16, 64, 513)

// Tried lots of variables for unk1 & unk2, nothing changed. All instances of this Method ended with 0, 0 from what I saw.

Usage

Lua
TaskMountAnimal(ped, mount, timer, seatIndex, pedSpeed, mountStyle, p6, p7)

-- always works, by hash
Citizen.InvokeNative(0x92DB0739813C5186, ped, mount, timer, seatIndex, pedSpeed, mountStyle, p6, p7)
JavaScript and C#
JavaScript
TaskMountAnimal(ped, mount, timer, seatIndex, pedSpeed, mountStyle, p6, p7);

// by hash
Citizen.invokeNative('0x92DB0739813C5186', ped, mount, timer, seatIndex, pedSpeed + 0.0000001, mountStyle, p6, p7);
C#
Function.Call((Hash)0x92DB0739813C5186, ped, mount, timer, seatIndex, pedSpeed, mountStyle, p6, p7);
  • 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.

Enums and flags

Sources

alloc8or RDR3 NativeDB · femga rdr3_discoveries

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