Configuration
Interaction
Open key and interaction distances.
Controls how close a player must be and which key opens a shop.
config.lua
Config.Interaction = {
distance = 2.0,
drawDistance = 10.0,
key = 38 -- E key
}
| Key | Type | Default | Description |
|---|---|---|---|
distance | number | 2.0 | How close (meters) a player must be to open the shop. |
drawDistance | number | 10.0 | How close (meters) before the marker is drawn and the loop speeds up. |
key | number | 38 | The control index that opens the shop (38 = E). |
How distance works
- Outside
drawDistance→ the shop loop sleeps (good for performance). - Inside
drawDistance→ the marker renders. - Inside
distance→ pressingkeyopens the NUI.
drawDistance is also re-checked server-side on purchase (capped at 10.0m) to prevent buying from far away. If you raise drawDistance above 10.0, players still must be within ~10m to actually pay.Changing the key
key is a FiveM control index, not a character. A few common ones:
| Key | Control index |
|---|---|
E | 38 |
G | 47 |
H | 74 |
Left Alt | 19 |
Full list of control indices: docs.fivem.net/docs/game-references/controls.

