Interactions

๐Ÿ“˜ FRKN-UIKIT Interactions

The Interactions system provides a lightweight and customizable alternative to classic targeting systems such as qb-target or ox_target. It allows players to interact with entities, world coordinates, or screen-based prompts using a clean NUI interface.


โšก Features

  • Add/remove dynamic interaction targets anywhere in the world

  • Works with entities (vehicles, peds, props) or vector3 coordinates

  • Supports two different interaction modes:

    • Default โ†’ list-based menu near the target

    • Screen โ†’ floating screen prompt in 3D space, activated with [E]

  • Multiple interaction options per target

  • Supports event triggers or custom action functions

  • Distance-based activation


๐Ÿ”น Interaction Modes

1๏ธโƒฃ Default Mode ("default")

  • Classic interaction list that appears near the entity/coords.

  • Player navigates with Arrow keys and selects with Enter/E.

  • Best suited for ATM menus, vehicle menus, NPC interactions.

Example:

2๏ธโƒฃ Screen Mode ("screen")

  • Displays a floating UI screen directly attached to the target.

  • Activated by holding [E] while near the target.

  • Perfect for immersive interactions such as racing tablets, hacking screens, or terminals.

Example:

๐Ÿ“‚ Exports

โž• AddInteract

Adds a new interaction target.

  • id (string) โ†’ Unique identifier for this target

  • entityOrCoords (entity / vector3) โ†’ Target entity or coordinates

  • distance (number) โ†’ Max distance (default: 2.0)

  • options (table) โ†’ List of interaction options

    • { name = "Option Label", event = "event:name", eventData = { ... } }

    • { text = "Custom Text", action = function(entity) ... end }

  • mode (string) โ†’ "default" or "screen"


โž– RemoveInteract

Removes an existing target.

๐Ÿ–ฅ๏ธ Example Commands

ATM Interaction


Vehicle Interaction


Screen Prompt Example


๐ŸŽฎ Default Controls

  • E โ†’ Interact / Focus

  • Arrow Left / Right โ†’ Navigate options

  • Enter โ†’ Confirm

  • Backspace โ†’ Back

  • ESC โ†’ Close

Last updated