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