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_hitchafter 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.
| Setting | Default | Behaviour |
|---|---|---|
RequireOnFoot | true | Requires the player to dismount before selecting a hitch point. |
HorseSearchRadius | 3.0 | Searches 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.
| Setting | Default | Behaviour |
|---|---|---|
SelectionDistance | 6.5 | Maximum reach of the placement sphere from the camera. |
MaxHorseToAnchorDistance | 3.0 | Maximum allowed distance between the horse and selected anchor. |
SelectionTimeout | 15000 | Cancels 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.
| Mode | Behaviour |
|---|---|
"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.0resembles a vertical wall.1.0represents flat ground.- Lowering
MaxWorldSurfaceNormalZmakes 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.
| Setting | Default | Behaviour |
|---|---|---|
MinAnchorHeight | 0.05 | Lowest valid anchor position. |
MaxAnchorHeight | 2.75 | Highest valid anchor position. |
SurfaceOffset | 0.035 | Moves 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 }
} | Setting | Behaviour |
|---|---|
Type | RedM marker type hash. |
Size | Overall marker size. |
SurfaceLift | Raises the marker slightly above the hit surface. |
Valid | RGBA colour used for an accepted hitch point. |
Invalid | RGBA 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
} | Action | Default |
|---|---|
| Confirm hitch point | R |
| Cancel selection | Backspace |
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'
} | Key | Displayed when |
|---|---|
Start | The player can begin selecting a hitch point. |
Release | The horse is already hitched and can be released. |
Confirm | The current placement can be confirmed. |
Cancel | Selection 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.