RX Hitch Configuration

RX Hitch keeps its behaviour in config.lua. The defaults are designed for close, believable interactions; change only the sections that need to match your server.

Restart rx_hitch after changing the configuration so every client receives the same values.

Player and horse detection

These settings decide whether selection can begin and how close the horse must be.

SettingDefaultBehaviour
RequireOnFoottrueRequires the player to dismount before selecting a hitch point.
HorseSearchRadius3.0Searches for the horse within this distance from the player.
Config = {}

Config.RequireOnFoot = true
Config.HorseSearchRadius = 3.0

Keep RequireOnFoot enabled when you want the interaction to feel deliberate and avoid starting placement while mounted. Increase HorseSearchRadius only if players regularly stand farther away from their horse when beginning the interaction.

Selection boundaries

Selection is intentionally limited around both the camera and the horse. This prevents players from hitching remotely or choosing an anchor the horse cannot reasonably reach.

SettingDefaultBehaviour
SelectionDistance6.5Maximum reach of the placement sphere from the camera.
MaxHorseToAnchorDistance3.0Maximum allowed distance between the horse and selected anchor.
SelectionTimeout15000Cancels selection after 15 seconds without confirmation. Value is in milliseconds.
Config.SelectionDistance = 6.5
Config.MaxHorseToAnchorDistance = 3.0
Config.SelectionTimeout = 15000

SelectionDistance controls what the player can point at. MaxHorseToAnchorDistance performs a separate horse-to-anchor check, so increasing one does not bypass the other.

Object selection

ObjectMode controls which stationary world objects can become hitch points.

ModeBehaviour
"any"Accepts stationary objects unless their model is blocked.
"whitelist"Accepts only models explicitly added to AllowedModels.
Config.ObjectMode = 'any'
Config.AllowWorldGeometry = true
Config.MaxObjectSpeed = 0.25

MaxObjectSpeed rejects objects moving faster than 0.25. Keep this value low so moving props, wagons, or unstable entities are not treated as reliable anchors.

Allowed models

Use AllowedModels when ObjectMode is set to "whitelist". Add model hashes as keys and set their value to true.

Config.AllowedModels = {
    -- [`p_hitchingpost01x`] = true,
}

Blocked models

Use BlockedModels to exclude individual objects that should never be valid hitch points.

Config.BlockedModels = {
    -- [`example_model`] = true,
}

World geometry

When AllowWorldGeometry is enabled, players can select suitable map surfaces even when the raycast does not hit a standalone object entity.

Config.AllowWorldGeometry = true
Config.MaxWorldSurfaceNormalZ = 0.90

Surface normal Z describes how upward-facing a surface is:

  • 0.0 resembles a vertical wall.
  • 1.0 represents flat ground.
  • Lowering MaxWorldSurfaceNormalZ makes world-surface selection stricter and more vertical.

Disable AllowWorldGeometry if hitching should be limited entirely to object entities.

Anchor placement

Anchor height is measured relative to the horse’s feet. These limits reject points that are too low or unrealistically high.

SettingDefaultBehaviour
MinAnchorHeight0.05Lowest valid anchor position.
MaxAnchorHeight2.75Highest valid anchor position.
SurfaceOffset0.035Moves the anchor slightly away from the selected surface.
Config.MinAnchorHeight = 0.05
Config.MaxAnchorHeight = 2.75
Config.SurfaceOffset = 0.035

Keep SurfaceOffset small. Its purpose is to keep the anchor from sitting directly inside the selected surface, not to visibly move the rope away from it.

Placement marker

The marker follows the world-space raycast point, allowing the player to see the exact position being tested.

Config.Marker = {
    Type = 0x50638AB9,
    Size = 0.13,
    SurfaceLift = 0.07,
    Valid = { 214, 189, 126, 225 },
    Invalid = { 126, 43, 43, 150 }
}
SettingBehaviour
TypeRedM marker type hash.
SizeOverall marker size.
SurfaceLiftRaises the marker slightly above the hit surface.
ValidRGBA colour used for an accepted hitch point.
InvalidRGBA colour used when placement cannot be confirmed.

Both colour arrays use { red, green, blue, alpha }, with values from 0 to 255.

Controls

Controls use RedM input hashes. The default selection key leaves E available for mounting the horse.

Config.Controls = {
    Select = 0xE3BF959B, -- R / INPUT_CONTEXT_X
    Cancel = 0x156F7119  -- Backspace
}
ActionDefault
Confirm hitch pointR
Cancel selectionBackspace

If you replace a control, use a valid RedM input hash and make sure it does not conflict with another interaction active at the same time.

Interface text

All player-facing labels can be changed without editing the interaction code.

Config.Text = {
    Start = 'Select Hitching Point',
    Release = 'Unhitch Horse',
    Confirm = 'Hitch Here',
    Cancel = 'Cancel'
}
KeyDisplayed when
StartThe player can begin selecting a hitch point.
ReleaseThe horse is already hitched and can be released.
ConfirmThe current placement can be confirmed.
CancelSelection mode can be closed without hitching.

You can translate these values or adjust their wording freely. Keep labels short so control prompts remain readable at smaller resolutions.