T3 // Underworld & Cyber

coe_races

Street Races

Illegal races with their own tablet, crypto buy-in, ranking and police risk

HEADLESS SERVICE (NO UI)
DEPENDS ON coe_corecoe_databasecoe_loggingcoe_ui
coe_races 2 exports · 2 commands

Runs without a NUI: nothing is rendered on the client and the resource stays idle until events arrive.

01 // OVERVIEW

Street races across the city: illegal player races on checkpoint tracks, organized through the racing tablet (race_tablet item, /corridas). Crypto buy-in (coe_crypto), tracks recorded by driving (players and staff), driver ranking, per-track records, history, car classes and the risk of police showing up (coe_dispatch).

On FiveM Enhanced

The app also shows in COE OS (Illegal group) for anyone carrying the item: no tablet, no race.

02 // FEATURES

What the module delivers

01

Racing Tablet

Races, organize, tracks, ranking and history.

02

Crypto Buy-in

Noxcoin stakes with prizes for the winners.

03

Recorded Tracks

Created by driving, with map and records.

04

Police Risk

Police calls during the race.

ARCHITECTURAL LAYERS // CLEAN ARCHITECTURE

4-Layer Isolation with 0.00 ms Idle

Every COE Framework script strictly follows the principle of separation of concerns. Interact with the 3D stack below:

L4
Presentation & NUI
HTML5 · CSS tokens · CoE UI
CEF DX12
L3
Application & Server
Atomic locks · Rate limiting
Auth Server
L2
Platform & HAL
Core.Platform · Mock natives
Gen9 HAL
L1
Domain & ACID Database
Prepared SQL · MariaDB pool
ACID Pool
LAYER 04 // PRESENTATION & NUI

Responsive NUI & CoE UI Design System

Built with vanilla HTML5, CSS3 tokens, and modern JavaScript. No heavyweight frameworks (React/Vue/Electron). Rendered directly in FiveM DX12's Chromium Embedded Framework at 0.00 ms while closed.

Five themes supported in real time through CSS variables (--coe-accent, --coe-surface)
Fully keyboard-navigable (Tab, Esc, Enter) and ARIA-accessible
Secure asynchronous communication with the FiveM client via fetch("https://...")
ADMIN POWERS // OPERATION & MANAGEMENT

What this script delivers to Server Owners

Manage your city without relying on developers. Runtime parameters, auditing, and ACE-protected commands:

🛡️
ACE Permissions
Administrative operations strictly protected by coe.staff and coe.admin principals.
IsPlayerAceAllowed(src, "coe.admin")
📊
Ledger Auditing
Relevant actions write audit records to the database through coe_audit.
exports.coe_audit:Record(severity, category, event, context)
⚡
0.00ms Idle Telemetry
Event-driven thread dispatch that stays dormant until network events fire.
Clean Architecture & HAL
03 // EXPORTS

Public API 2

Typed contracts to call from other resources. Full types live in types.lua and in the docs reference.

exports['coe_races']:TabletVisible(playerId, appId) → boolean

Returns whether the racing app is available in COE OS. The player must carry the race_tablet item; only coe_tablet may call it.

ParameterType
playerIdinteger
appIdstring
LUA
local result = exports['coe_races']:TabletVisible(playerId, appId)
exports['coe_races']:TabletCall(playerId, appId, action, payload) → table

Handles the racing app in COE OS (the same actions as the standalone tablet). Only coe_tablet may call it. Actions: state, setNickname, tracks, track, wallets, createRace, join, leave, startNow, cancelRace, leaderboard, history, startRecording, saveTrack, trackStatus, adminRaces. Errors: forbidden, not_ready, no_character, no_tablet, rate_limited, no_nickname, nickname_taken, unknown_track, unknown_race, race_full, race_started, already_racing, already_organizing, invalid_wallet, invalid_payout, insufficient_funds, crypto_unavailable, not_enough_races, too_few_checkpoints.

ParameterType
playerIdinteger
appIdstring
actionstring
payloadtable
LUA
local result = exports['coe_races']:TabletCall(playerId, appId, action, payload)
04 // COMMANDS

In-game commands 2

/corridas

Opens the racing tablet (requires the race_tablet item).

/sairdacorrida

Leaves the current race.