RDE_HOOKERS DOCS
RED DRAGON ELITE // ECONOMY & GAMEPLAY · ADULT ROLEPLAY

Server-Authoritative.
Cheat-Proof by Design.

rde_hookers is a statebag-synced NPC companion service system for ox_core, built to the same production standards as every other RDE resource — server-owned state, ox_core player validation on every event, and a configurable auto-opening service menu that avoids key-conflict issues entirely.

01 / Start Here

Overview

An ox_target-driven NPC interaction system with a statebag-first architecture — the server owns all state, so nothing about pricing, duration, or active status can be manipulated client-side.

Core Principle A withPlayer statebag prevents the same NPC from being engaged by two players simultaneously — a common exploit vector in similar scripts.

Why this over typical implementations

Typical Scriptsrde_hookers
No sync — only works for the spawning clientStatebag-synced, server-authoritative
Hardcoded keybinds — conflicts with vehicle controlsAuto-menu opens after parking, no key conflicts
Crashes on player disconnectAll edge cases handled, zero crashes
Discord-only loggingOptional Nostr logging, decentralized
02 / Start Here

Quick Start

server.cfg
ensure oxmysql
ensure ox_lib
ensure ox_core
ensure ox_target
ensure ox_inventory
ensure rde_nostr_log   -- optional
ensure rde_hookers

No database tables needed — zero SQL setup. Start the resource and check console for the startup banner.

03 / Reference

Player Flow

  1. Approach an NPC on foot or drive up — ox_target shows an interaction option (must be driver, seat must be free)
  2. NPC walks to the vehicle and gets in
  3. Park and stop the engine, or put the vehicle in neutral
  4. After a configurable delay, the service menu opens automatically
  5. Select a service — server charges the configured currency via ox_inventory
  6. Animation and duration run server-authoritatively
Why no E-key? E in a vehicle triggers horn/exit natives — it conflicts. The auto-open approach avoids this entirely.
04 / Reference

Configuration

config.lua
Config.Locale       = 'en'
Config.Currency     = 'money'   -- ox_inventory item name
Config.MaxServiceSpeed = 3.0     -- km/h — stationary threshold

Config.Advanced = {
    InteractionDistance = 3.0,   -- ox_target radius (metres)
    AutoMenuDelay       = 2500,  -- ms parked before menu auto-opens
    EntryTimeout        = 10,    -- seconds before NPC entry times out
}
05 / Reference

Nostr Logging

If rde_nostr_log is installed and started, invites, purchases, aborted services, and admin commands log automatically. The script checks GetResourceState('rde_nostr_log') before every log call — completely silent fallback if it's not running.

06 / Reference

Exports

ExportNotes
HasEnoughMoney(source, amount)Check currency balance
PlayerHasHooker(source)Returns true/false — active NPC check
GetActiveHookerCount()Server-wide active count
GetStatistics()Lifetime totals — invites, services, revenue
Admin CommandDescription
/hookerstatsActive count, in-service count, revenue & stats
/hookercleanupForce-dismiss all active NPCs server-wide
07 / More

Common Pitfalls

Service menu never opens

The vehicle must be fully stopped — speed below Config.MaxServiceSpeed (default 3 km/h) — and the player must be the driver.

Fix: put the vehicle in neutral or turn the engine off, then wait for AutoMenuDelay (default 2.5s).

Server crashes on player disconnect

A known bug in older versions caused by GetPlayerName infinite recursion.

Fix: resolved in the current release — update if you're on an older build.

08 / More

FAQ

Can two players interact with the same NPC?

No — the withPlayer statebag marks an NPC as engaged the moment a player invites them, blocking concurrent access.

Is Nostr logging required?

No — fully optional, silent no-op if rde_nostr_log isn't installed.

09 / More

Roadmap

v1.1

Privacy check (refuse service near NPCs), multiple service locations, optional risk/reward mechanic.

v2.0

Player-owned management system, dynamic pricing, reputation-based discounts, custom ped outfits.