Skip to content

Configuration ​

Everything is in configs/client/, plus one convar for replacing a target resource.

interact.lua ​

Defaults for every point, and how the focused point is chosen. A point or an option can set its own distances.

OptionDefaultDescription
Distance7.0Metres within which a point shows (as a dot)
InteractDistance2.6Metres within which its prompt can open
Slack0.75Added to every distance a prompt is allowed at. A point is measured to its middle, but a player reaches for its near side
FocusRadius0.22How far from the middle of the screen a point may be and still take the prompt, as a fraction of the screen's width
Stickiness0.03A focused point keeps the prompt until another is this much nearer the middle, so two close points don't flicker between each other
LineOfSighttrueA prompt behind a wall or a door doesn't open (a ray from the camera has to reach the point)
LosEveryMs100How often the focused point's line of sight is checked
ScanEveryMs200How often points in range, entities of watched models, and options (canInteract) are refreshed
ModelScanRange12.0Metres around the player searched for entities of addModel models and global points
HideInVehicletrueHide prompts while the player is in a vehicle (a point can set allowInVehicle = true)
HideWhileAimingtrueHide prompts while the player aims
HideWhenNuiFocusedtrueHide prompts while a menu or inventory has the mouse
HideWhenDeadtrueHide prompts while the player is dead

controls.lua ​

The default keys. They are FiveM key mappings, so each player can rebind them in Settings > Key Bindings > FiveM; these are only what a new player starts with.

OptionDefaultDescription
Key'E'Confirm, on a keyboard
Next / Prev'IOM_WHEEL_DOWN' / 'IOM_WHEEL_UP'Next and previous option: the mouse wheel
Pad'LRIGHT_INDEX'Confirm on a controller: d-pad right, GTA's own button for interacting
PadNext / PadPrev'LDOWN_INDEX' / 'LUP_INDEX'Next and previous option: d-pad down and up
Block{ 14, 15, 16, 17, 99, 100, 261, 262, 27, 172, 173, 19 }Game controls held off while a prompt with more than one option is open, so the wheel and the d-pad turn the drum instead of switching weapons or opening the phone

Keyboard key names are FiveM's keyboard mapper ids; pad buttons are PAD_DIGITALBUTTON names (LUP_INDEX, RDOWN_INDEX for A, and so on).

draw.lua ​

How the prompt and the dots look.

OptionDefaultDescription
Scale1.08Prompt size. 1.0 is its size at 1080p, and it scales with the screen's height
AccentnilColour of the hold outline, e.g. '#7cc4ff'. nil keeps the prompt all white
GlideMs140Moving from one point to the next, the prompt glides there over this long
LeaveMs150How long the prompt takes to close
DotstrueDraw dots on points in range that aren't focused
DotSize7Dot size, in pixels at 1080p
DotAlpha165Dot opacity, 0 to 255
DotMerge28Dots closer together than this on screen (pixels at 1080p) merge into one
DotClear120No dots this close to the open prompt (pixels at 1080p)
DotFade10How fast dots fade in and out (higher is quicker)
Canvas / Anchor{ w = 760, h = 420 } / { x = 48, y = 210 }The prompt page's size and where on it the point goes. Only change these together with CANVAS and ANCHOR in web/src/Prompt.tsx

config.lua ​

OptionDefaultDescription
Locale'en'Which locales/*.json to use: the key mapping names in the settings menu and the word "Hold"
DebugfalsePrints focus changes and draws every point's anchor

The replace convar ​

Set in server.cfg, before ensure sd-interact, to answer another target resource's exports:

cfg
setr sd_interact:replace "ox_target,qtarget"

Off unless set. The names it takes are ox_target, qtarget and qb-target. Read Replacing ox_target / qb-target before turning it on.