Skip to content

Raycin Menu โ€” Admin Features

The in-world Raycin Menu (rralan_nativemenu resource, F10 by default) is where admins do day-to-day racing operations: host gates, server-wide whitelist mode, runtime resource controls, and live diagnostics. Everything here is gated behind an ACE check โ€” non-admins see the Dev Tools section greyed out.


Getting in: how the admin check works

Every time you open the menu, your client asks the server: "is this player admin?" The server side runs through these ACEs in order and the first ALLOW wins:

ACE checked Granted by (typical)
raycin_creator.access add_ace group.admin raycin_creator.access allow
raycin_races.admin add_ace group.admin raycin_races.admin allow
raycin_races.access add_ace group.admin raycin_races.access allow
rralan_nativemenu Custom principal, optional

If any one of these returns ALLOW, Dev Tools is unlocked. Most admin servers already grant raycin_creator.access to group.admin, so adding your license to group.admin is the path of least resistance:

add_principal identifier.license:YOUR_LICENSE_HEX group.admin

See Quick Reference โ†’ Permissions for the full ACE / principal pattern.

Two diagnostic chat commands

If Dev Tools is greyed out and you think it shouldn't be, type these in chat (press T then type, then Enter):

Command What it shows Where the reply lands
/raycin_check Your client-side _isAdmin state; also re-asks the server Chat box (yellow lines) + F8 client console
/raycin_admin_check Your license + each ACE check result + final verdict + the rule that matched Chat box (~6-7 yellow lines) + server console (audit line)

When dev tools is greyed but should not be

Run /raycin_admin_check. If every ACE shows DENY, check:

  1. Your license in chat matches the one in server.cfg add_principal โ€ฆ
  2. add_ace group.admin raycin_creator.access allow is in server.cfg
  3. The rralan_nativemenu/fxmanifest.lua line server_script 'server.lua' is NOT commented out (this exact issue silently blocked admin status for a long time before being found โ€” the server-side admin sync simply wasn't running).

๐Ÿ† Player Hub โ€” everyday tools for every player

Open Raycin Menu โ†’ Racing Lobby โ†’ ๐Ÿ† Player Hub. This submenu is available to every player (no admin check) and collects the things you reach for between races. It was previously called My Stats โ€” same place, broader contents.

Item What it does
My Race Points Fetches your personal RP total from the server and prints it to chat.
Top 10 Leaderboard Pulls the global RP leaderboard (top 10 by points) into chat.
My Vehicles Opens your personal garage showroom โ€” save builds, customise, delete. Same as the /my_vehicles command. Also still available under Quickish Race Sessions for muscle-memory.
๐Ÿšฉ Set My Flag Submenu of country flags (GB / US / DE / FR / ES / IT / BR / AU / JP / NL / PT / SE / BE / ZA / NO). Pick one to set the flag shown next to your name on the in-race HUD and scoreboard. Wraps the /setflag <code> command.

For admins

There is nothing admin-only inside Player Hub โ€” admins see exactly the same items as players. Admin-only operations live in Dev Tools, Hosting Permissions, and Whitelist Mode (covered below). The garage / RP / leaderboard / flag items work identically whether you're admin or not, so admins can use Player Hub for their own pre-race prep the same way players do.


Dev Tools โ€” quick admin productivity shortcuts

Open Raycin Menu โ†’ Racing Lobby โ†’ ๐Ÿ”ฌ Dev Tools. Every item below is gated by your admin check.

๐Ÿ“‹ Show My License

Prints all of your FiveM identifiers (license:, fivem:, discord:, license2:) to your chat box. Saves the "join the server then dig through the console log" dance when you need to grant ACE permissions to a new admin.

๐Ÿ”„ Restart raycin_races (2-click confirm)

Hot-restarts the raycin_races resource. First click arms (item flashes โš  "Click again to confirm"). Second click within 3 seconds fires the restart. Server console logs [raycin_races] /restart triggered by <admin name>.

Players in an active race

A restart drops them back to freemode and ends the current race. Use during quiet windows or when you genuinely need to push a Lua fix.

๐Ÿงน Force-unstick everyone (2-click confirm)

Broadcasts a closeNUI message to every connected player. Hides any stuck v3 NUI screen (showroom, race-creation, leaderboard, etc.) and tells Lua to release NUI focus.

Useful when a player reports "I'm stuck on the menu/garage and can't move" โ€” hit this and their state clears in seconds, no disconnect/reconnect needed.

๐Ÿ“Š List active rooms

Opens a sub-menu populated by a server callback. Shows every open race room:

๐Ÿ <track name> ยท 4 ๐Ÿ‘ฅ ยท racing
   Host: KernowGlyn | Mode: face_to_face | Vehicle: track_class | Cat: F2F

Display-only for now (no click-to-spectate or click-to-end actions yet โ€” those are candidate features for a future round).


๐Ÿ” Hosting Permissions โ€” who can host races

The first sub-menu in Dev Tools. Controls who is allowed to host a race on your server (separate from who can connect โ€” that's the Whitelist Mode).

Mode Effect When to use
๐ŸŸข Whitelist (role-gated) Approved whitelist roles (admin/staff/crew/drivers/vip/temp) + ACE admins can host Default for community servers
๐ŸŒ Open to everyone Anyone connected can host Casual/community days, public events
๐Ÿ”ง ACE-only (lockdown) Only players with the raycin_races.access ACE Events; tournaments where only staff host
๐Ÿ”’ Strict (whitelist roles only) Whitelist roles only โ€” even ACE admins are denied Maximum control

The currently active mode shows a โœ“ tick badge + "ACTIVE" right-side label. Clicking another mode fires immediately; the server updates Config.Whitelist.* in memory, persists the choice to data/hosting_mode.json, and the change survives restart raycin_races and full server restarts.

Only one mode is active at a time โ€” Open beats everything

The four modes are mutually exclusive, not a stack of toggles. Every time you click a mode, applyMode() first clears the previous flags then writes the new mode's combination of UseRaycinWhitelist / UseAce / AllowCooldownFallback / AllowAnyone. So picking ๐ŸŒ Open doesn't "add to" Whitelist โ€” it overwrites it completely.

Priority order used to detect the current mode (highest wins):

  1. AllowAnyone == true โ†’ Open (short-circuits the entire permission callback in main_server.lua โ€” no other check runs)
  2. UseRaycinWhitelist && !UseAce โ†’ Strict
  3. UseRaycinWhitelist && UseAce โ†’ Whitelist (roles)
  4. !UseRaycinWhitelist && UseAce && !AllowCooldownFallback โ†’ ACE-only

Open is the strongest signal. If you ever set it, every player can host until you flip back to another mode โ€” there's no role check, no ACE check, no cooldown trap. That's the whole point.

How the mode is restored at start

On raycin_races resource start, server/admin_overrides.lua reads data/hosting_mode.json. If a previous admin set a mode, that mode is re-applied. If the file is missing, Config.Whitelist.* defaults from config_server.lua apply untouched.


๐Ÿ›ก Whitelist Mode โ€” who can connect to the server

The second sub-menu in Dev Tools. Controls who is allowed to connect to the FiveM server itself. Mirrors raycin-whitelist's /setmode command.

The 5 modes

Mode Allowed roles Common use
๐ŸŒ Everyone No role check Default for public servers
๐ŸŽ Drivers + above drivers, crew, staff, admin Casual race nights โ€” keeps out probation/temp
๐Ÿ‘ฅ Crew + above crew, staff, admin Crew-only events
๐Ÿ›ก Staff + admin staff, admin Maintenance windows
๐Ÿ”’ Admin only admin Emergency lockdown

Delayed (default) vs Instant

The submenu has a โšก Instant change checkbox at the top:

Toggle Behaviour
OFF (default) 60-second grace + chat announce + Discord log. Players see "RAYCIN NOTICE โ€” switching to X in 60 seconds". At T+60s the mode actually flips, ineligible players are kicked, and a "โœ… RAYCIN ACTIVE" announce confirms. Polite.
ON Mode flips on the next tick. Non-matching players are kicked immediately. The pre-announce is skipped (only the final announce + kick run). Use for emergency lockdown.

What players see

  • Pre-announce (delayed only, T+0): styled RAYCIN NOTICE chat + QBCore notification
  • Final announce (T+delay): styled RAYCIN ACTIVE chat + QBCore notification
  • Discord audit log: Two embeds for delayed (Scheduled orange + Changed green) or one for instant (INSTANT orange)
  • Ineligible players: dropped via DropPlayer(src, reason) with the rejection reason visible on their FiveM disconnect screen

Real-time badge updates

Whenever the mode actually flips on the server:

  • All connected admins get a yellow chat line: [raycin] ๐Ÿ›ก Whitelist Mode is now: staff_only (by KernowGlyn)
  • The โœ“ ACTIVE badge in any open Whitelist Mode submenu repaints to the new mode in real time
  • Non-admins see only the standard raycin-whitelist styled broadcast (no extra noise)

Safety nets

  • Rate limit: Spamming mode changes hits Config.RateLimit.setmode and the request is rejected with FAIL: rate-limited
  • Pending lock: Only one mode change can be in-flight at a time. Clicking a second mode during the 60s grace returns FAIL: a mode change is already pending
  • DB persistence: The mode survives server restarts (read from raycin_whitelist_mode table latest row on boot)

Instant mode kicks are immediate

There is no grace window with Instant ON. If you switch to Admin only instantly, every non-admin currently connected is kicked in less than a second. Useful for stopping abuse mid-incident; harmful for routine flips. Leave Instant OFF unless you specifically need it.


Access scenarios โ€” what each gate actually does

Two independent gates control what a player can do. Knowing which gate blocks what is the key to diagnosing any "I can'tโ€ฆ" report quickly.

The two gates do NOT affect each other โ€” they fire at different moments

Whitelist Mode runs once at the connection screen (before the player loads in). Hosting Permissions runs every time a player clicks open the race menu (after they're already on the server). Different code paths, different events, different decisions โ€” neither reads the other's state.

Think of it as a front door + an internal door:

  1. Whitelist Mode = the front door. If it kicks you, you never reach the lobby โ€” Hosting Permissions is irrelevant for you.
  2. Hosting Permissions = an internal door that only opens when you click Create Race. Whitelist Mode is irrelevant here โ€” you're inside.

So you can mix-and-match freely (see the Quick decision table below).

The only indirect link: if you set Hosting = ๐ŸŸข Whitelist (roles) or ๐Ÿ”’ Strict, the host check reads the player's role from the same raycin_whitelist DB table the connection check uses. A player with no row fails both โ€” for different reasons in different places. Set Hosting to ๐ŸŒ Open or ๐Ÿ”ง ACE-only and even that indirect link disappears.

Gate Controlled by What it decides
Whitelist Mode Raycin Menu โ†’ ๐Ÿ›ก Whitelist Mode (or /setmode) Whether the player can connect to the server at all. Checked once at the connection screen.
Hosting Permissions Raycin Menu โ†’ ๐Ÿ”ฌ Dev Tools โ†’ ๐Ÿ” Hosting Permissions Whether a player (who is already on the server) can click Create Race. Checked every time they open the race menu.

My Vehicles is not gated by either (since Config.AllowPersonalVehiclesForAll = true) โ€” any connected player can save / customise personal builds.

Quick decision table

This is the master reference. Read across a row: "if I want Trench to do X, what do I set?"

Goal for the player Whitelist Mode setting Hosting Permissions setting What the player can do
Public party โ€” anyone can do everything ๐ŸŒ Everyone ๐ŸŒ Open to everyone โœ… Connect ยท โœ… Host ยท โœ… Join ยท โœ… My Vehicles
Public connect, but only trusted hosts ๐ŸŒ Everyone ๐ŸŸข Whitelist (roles) โœ… Connect ยท โŒ Host (unless approved + correct role) ยท โœ… Join ยท โœ… My Vehicles
Members club โ€” only whitelisted in, anyone in can host ๐Ÿš— Drivers Only (or higher) ๐ŸŒ Open to everyone โœ… Connect (if has role) ยท โœ… Host (everyone who got in) ยท โœ… Join ยท โœ… My Vehicles
Locked club โ€” only trusted in, only trusted host (recommended for events) ๐Ÿš— Drivers Only (or higher) ๐ŸŸข Whitelist (roles) โœ… Connect (if has role) ยท โœ… Host (same role check) ยท โœ… Join ยท โœ… My Vehicles
Total lockdown โ€” admins only ๐Ÿ‘‘ Admin Only ๐Ÿ”ง ACE-only โœ… Connect (admins) ยท โœ… Host (admins) ยท โŒ Everyone else kicked at connect
Strict whitelist, no admin ACE escape hatch ๐Ÿš— Drivers Only (or higher) ๐Ÿ”’ Strict โœ… Connect (if has role) ยท โœ… Host (only role-matched players) ยท admins must also have a whitelist row

Hosting vs My Vehicles โ€” side-by-side compare

My Vehicles has its own config flag (Config.AllowPersonalVehiclesForAll in config/config_client.lua). That flag โ€” combined with your Hosting Permissions choice โ€” decides who can open the garage. Two scenarios:

Default setup (AllowPersonalVehiclesForAll = true) โ€” what ships now:

Player situation Hosting Permissions Can HOST a race? Can open MY VEHICLES?
Admin (ACE allowed) Any setting โœ… Yes โœ… Yes
Whitelisted (correct role) ๐ŸŒ Open ยท ๐ŸŸข Whitelist ยท ๐Ÿ”’ Strict โœ… Yes โœ… Yes
Whitelisted (wrong role) ๐ŸŸข Whitelist ยท ๐Ÿ”’ Strict โŒ Denied โœ… Yes
Whitelisted (wrong role) ๐ŸŒ Open to everyone โœ… Yes โœ… Yes
Not whitelisted (random player) ๐ŸŒ Open to everyone โœ… Yes โœ… Yes
Not whitelisted (random player) ๐ŸŸข Whitelist ยท ๐Ÿ”ง ACE-only ยท ๐Ÿ”’ Strict โŒ Denied โœ… Yes

Locked-down setup (AllowPersonalVehiclesForAll = false) โ€” flip this in config/config_client.lua if you want the garage gated like hosting:

Player situation Hosting Permissions Can HOST a race? Can open MY VEHICLES?
Admin (ACE allowed) Any setting โœ… Yes โœ… Yes
Whitelisted (correct role) ๐ŸŒ Open ยท ๐ŸŸข Whitelist ยท ๐Ÿ”’ Strict โœ… Yes โœ… Yes
Whitelisted (wrong role) ๐ŸŸข Whitelist ยท ๐Ÿ”’ Strict โŒ Denied โŒ Denied
Whitelisted (wrong role) ๐ŸŒ Open to everyone โœ… Yes โœ… Yes
Not whitelisted (random player) ๐ŸŒ Open to everyone โœ… Yes โœ… Yes
Not whitelisted (random player) ๐ŸŸข Whitelist ยท ๐Ÿ”ง ACE-only ยท ๐Ÿ”’ Strict โŒ Denied โŒ Denied

Key takeaway: with the default flag, My Vehicles is always available to any connected player (because it's a personal feature โ€” saved builds don't affect anyone else). With the locked-down flag, My Vehicles follows the exact same rules as hosting.

To change the flag:

-- config/config_client.lua
Config.AllowPersonalVehiclesForAll = true   -- default: anyone can open the garage
-- Config.AllowPersonalVehiclesForAll = false -- locked: garage uses hosting permissions
Then restart raycin_races.

Scenario walkthroughs โ€” step by step

Scenario A โ€” "I want my test player Trench to be able to host"

  1. Open Raycin Menu โ†’ ๐Ÿ”ฌ Dev Tools โ†’ ๐Ÿ” Hosting Permissions.
  2. Pick ๐ŸŒ Open to everyone.
  3. (That's it.) Trench can now click Create Race without applying for whitelist.

Scenario B โ€” "I want Trench whitelisted as a normal driver, not an admin"

  1. Open Raycin Menu โ†’ ๐Ÿ”ฌ Dev Tools โ†’ ๐Ÿ‘ค Set Player Role.
  2. Find Trench in the list, scroll the role to drivers, press Enter to apply.
  3. Open Raycin Menu โ†’ ๐Ÿ”ฌ Dev Tools โ†’ ๐Ÿ” Hosting Permissions โ†’ ๐ŸŸข Whitelist (roles).
  4. Trench can now connect, host races, and join. They get no admin tools.

Scenario C โ€” "I want to run a private members-only race night"

  1. Pre-event: assign Crew / Drivers roles via ๐Ÿ‘ค Set Player Role (or web Apply).
  2. Open ๐Ÿ›ก Whitelist Mode โ†’ pick ๐Ÿš— Drivers Only. Currently-connected non-drivers get a 30-second warning then get kicked.
  3. Open ๐Ÿ” Hosting Permissions โ†’ leave at ๐ŸŸข Whitelist (roles) so only your approved members can host.
  4. After the event: ๐Ÿ›ก Whitelist Mode โ†’ ๐ŸŒ Everyone to reopen the server.

Scenario D โ€” "I'm closing the server for maintenance, only I should be in"

  1. Open ๐Ÿ›ก Whitelist Mode โ†’ ๐Ÿ‘‘ Admin Only.
  2. Open ๐Ÿ” Hosting Permissions โ†’ ๐Ÿ”ง ACE-only.
  3. All non-admins get kicked at the connection screen; nobody else can host.
  4. Don't forget to flip both back when you reopen.

Scenario E โ€” "A friend joined and says 'You don't have permission to host'"

  1. Check Raycin Menu โ†’ ๐Ÿ” Hosting Permissions: is it on Whitelist / ACE-only / Strict?
  2. If Whitelist (roles): have they been approved? Use ๐Ÿ‘ค Set Player Role to give them a role from the allowed list (admin / staff / crew / drivers / vip / temp).
  3. If ACE-only: only ACE-allowed players can host โ€” easiest fix is switch Hosting Permissions to ๐ŸŸข Whitelist (roles) and give them a role, or ๐ŸŒ Open to everyone for casual play.
  4. Watch the server console for the diagnostic line:
    [raycin_races] host DENIED for <name> (license <hex>) โ€” UseAce=โ€ฆ UseRaycinWhitelist=โ€ฆ AllowAnyone=โ€ฆ AllowCooldownFallback=โ€ฆ
    
    That tells you immediately which gate denied them.

Scenario F โ€” "A friend can't even connect to the server"

  1. Check Raycin Menu โ†’ ๐Ÿ›ก Whitelist Mode. If it's anything other than ๐ŸŒ Everyone, they need a whitelist row.
  2. Use ๐Ÿ‘ค Set Player Role to give them an appropriate role โ€” they need to reconnect after you do this.
  3. Or switch Whitelist Mode โ†’ ๐ŸŒ Everyone if you want unrestricted joining.
  4. Check the FiveM server console โ€” the rejection reason is logged (Whitelist mode: Drivers Only etc.).

Mental model โ€” read this once and remember

Whitelist Mode = the door of the club (can they walk in?)
Hosting Permissions = the DJ booth (once they're in, can they pick the track?)
My Vehicles = your locker (once in, always yours โ€” no one gates it)


Fake Drivers, Lock/Unlock Race

Existing Dev Tools items that pre-date this round:

  • Fake Drivers โ€” Toggle on/off ghost drivers that appear in the HUD bar (visual only, for solo race testing). No resource restart required.
  • ๐Ÿ”’ Lock Race / ๐Ÿ”“ Unlock Race โ€” Prevent or allow new players joining the race room.

Where the code lives

For server owners or maintainers debugging:

Feature File
Admin check (server) rralan_nativemenu/server.lua (must be registered in fxmanifest.lua โ€” was previously a commented-out line)
Admin client state rralan_nativemenu/client.lua (_isAdmin var, adminResult event)
Hosting Permissions toggle raycin_races/server/admin_overrides.lua (escrow_ignore)
Show License / Restart / Force-unstick / List rooms raycin_races/server/admin_overrides.lua + raycin_races/client/admin_helpers.lua
Whitelist Mode wrapper raycin-whitelist/server.lua (AdminSetMode export)
/raycin_check rralan_nativemenu/client.lua
/raycin_admin_check rralan_nativemenu/server.lua

All four raycin_races admin files are listed in fxmanifest.lua's escrow_ignore block, meaning they stay readable for live operations and survive re-escrow.


Quick test checklist when adding a new admin

  1. Add their license to group.admin in server.cfg (or grant raycin_creator.access directly)
  2. They join โ€” open chat (T) โ†’ /raycin_admin_check โ€” confirm verdict is ALLOW
  3. They open Raycin Menu (F10) โ†’ Racing Lobby โ†’ Dev Tools should NOT be greyed
  4. Each Dev Tools item works (Show License, Restart, Force-unstick, List rooms, Hosting Permissions, Whitelist Mode)
  5. Discord audit channel logs the join + any mode changes they make