Sleepless Interact
A 3D DUI interaction library for interacting with various entities and points in the world. Provides a modern, performant alternative to traditional targeting systems with full ox_target API compatibility.
Features
- 🎯 3D DUI Rendering - Beautiful interaction indicators rendered in 3D world space
- 🔄 ox_target Compatibility - Full drop-in support for ox_target exports
- 📍 Multiple Target Types - Coordinates, entities, models, and global types (objects, peds, players, vehicles)
- 🎨 Customizable Theme - Configurable colors, sprites, and keybinds
- ⚡ Performance Optimized - Distance-based culling with configurable render distance
- 🚗 Vehicle Support - Options can be configured to work inside vehicles
- ⏱️ Hold Actions - Support for press-and-hold interactions with configurable durations
- 🧊 Cooldown System - Prevent interaction spam with per-option cooldowns
- 🔁 Active Callbacks -
onActive,onInactive, andwhileActivecallbacks for advanced use cases
Dependencies
- ox_lib (opens in a new tab) (required)
ox_target Compatibility
Sleepless Interact fully supports the ox_target API. If you enable the ox_target bridge, the resource will handle all ox_target exports, allowing you to use it as a drop-in replacement without modifying other resources.
Installation
Download the Resource
Download a release (opens in a new tab) or build from source:
git clone https://github.com/Sleepless-Development/sleepless_interact.git
cd sleepless_interact/web
pnpm i
pnpm buildAdd to Server
Place the sleepless_interact folder in your server's resources directory.
Configure Your Server
Add the following to your server.cfg:
ensure ox_lib
ensure sleepless_interactConfigure the Resource
Edit the configuration in imports/config.lua to customize keybinds, theme colors, and render distance. See the Configuration page for details.
Quick Start
Adding a Coordinate Interaction
local id = exports.sleepless_interact:addCoords(vec3(100.0, 200.0, 30.0), {
label = "Interact Here",
icon = "hand",
distance = 2.0,
onSelect = function(data)
print("Selected at", data.coords)
end,
})Adding a Global Ped Interaction
exports.sleepless_interact:addGlobalPed({
label = "Talk to Ped",
name = "talk_to_ped",
icon = "comment",
distance = 2.0,
onSelect = function(data)
print("Talking to ped", data.entity)
end,
})See the Client Exports page for the full API reference.
Support
If you need help or have questions: