RX Interact Installation (RedM)

RX Interact is an interaction system for RedM. Walk up to something and a small dot appears on it; get close and look at it, and the dot turns into the key with the action next to it. When a target has more than one action, scroll through them with the mouse wheel or the arrow keys, then hold the key.

It also brings on-screen key hints, text UI, menus, input forms, notifications, and three minigames (a skill check, a safe, and a water pump), all in the same style. It stands in for ox_target, rsg-target, murphy_interact, rsg-core’s DrawText and Notify, and parts of ox_lib, so the scripts you already run keep working and simply take on the new look.

It has the same exports as RX Interact for FiveM, so a script written for that one ports over with little or no change.

Requirements

RequirementNotes
FrameworkNone needed. RSG (rsg-core) and VORP (vorp_core) are supported: with one of them running, the job, grade, and item checks on target options are read from it. Without a framework, those checks always pass.
ox_libNot required. If your server runs it, RX Interact takes over its text UI, context menus, input and alert dialogs, and notifications.

There is no SQL to import and nothing runs on the server side.

1. Place the resource

Extract rx_interact into your server’s resources directory.

2. Remove what it replaces

Take these resources out of your server, because RX Interact answers for them:

  • ox_target (and its RSG or VORP forks)
  • rsg-target
  • murphy_interact

Remove their ensure line from server.cfg, and move their folder out of any folder that is started as a whole: ensure [standalone] starts every resource inside it.

Keep your framework (rsg-core or vorp_core) and ox_lib. RX Interact replaces only parts of them and needs them to keep running.

If one of the originals is still running, RX Interact leaves it alone and reports it in the F8 console. To keep an original on purpose, turn its entry off in Config.Bridge.

3. Add it to server.cfg

Put ensure rx_interact where your target resource used to be: after your framework and ox_lib, and before the scripts that use them.

server.cfg
ensure ox_lib
ensure rsg-core   # or vorp_core

ensure rx_interact

# scripts that use ox_target, rsg-target, murphy_interact...
ensure rsg-shops
ensure rsg-banking

4. Restart the server

On start, the F8 console lists everything RX Interact is answering for. Nothing in your other scripts needs to change: they keep calling ox_target, rsg-target, and murphy_interact as before. Scripts that list one of them as a dependency still start, because RX Interact provides those names.

5. Route rx_core notifications (optional)

To show RX.Notify from other Ripex resources in the RX Interact style, set this in rx_core’s config:

Lua
RXConfig.NotifyOverride = function(message, notifyType, duration)
    exports.rx_interact:notify(message, notifyType, duration)
end

rsg-core and ox_lib notifications need no change; they are taken over automatically.

Frameworks

FrameworkWhat is read
RSGThe player’s job and grade, gang, citizen id, and items, from rsg-core.
VORPThe job and grade from LocalPlayer.state.Character, the character id, and items from vorp_inventory. VORP has no gangs, so an action limited to a gang stays closed.
StandaloneNothing. Job, gang, and item limits on actions are not checked.

Controls

KeyAction
E (hold)Use the selected action. The hold time is set by Config.Hold; some actions are a simple press.
Mouse wheel, arrow keysChoose between several actions on the same target

There is no eye key (Alt). Prompts appear as players get near, and the interact key uses them. While a prompt is up on E, the game’s own E (mount, enter) is held back, so pressing it next to a horse does not mount it too. Players can rebind the key under Settings > Key Bindings > RedM.

Trying it in game

/rxitest puts a prompt with five actions in front of you, with a key hint and a notification. The actions open a menu, a form, the pump, the skill check, and the safe. Run it again to take it away.

Set Config.TestCommand = false before opening the server to players.

Good to know

  • If you restart rx_interact on its own while the server is running, also restart the scripts that use it.
  • ignoreVehicleDoors and AllowRefuel are kept so ported FiveM scripts do not break, but they do nothing on RedM.
  • config.lua and the locales folder are open to edit.

Next: Configuration for the theme, look, distances, and bridges, and Exports for adding RX Interact to your own scripts.