Alamo Studio Logo
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
}
KeyTypeDefaultDescription
distancenumber2.0How close (meters) a player must be to open the shop.
drawDistancenumber10.0How close (meters) before the marker is drawn and the loop speeds up.
keynumber38The 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 → pressing key opens 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:

KeyControl index
E38
G47
H74
Left Alt19
Full list of control indices: docs.fivem.net/docs/game-references/controls.
Copyright © 2026