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:
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:
- Your license in chat matches the one in
server.cfg add_principal โฆ add_ace group.admin raycin_creator.access allowis inserver.cfg- The
rralan_nativemenu/fxmanifest.lualineserver_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):
AllowAnyone == trueโ Open (short-circuits the entire permission callback inmain_server.luaโ no other check runs)UseRaycinWhitelist && !UseAceโ StrictUseRaycinWhitelist && UseAceโ Whitelist (roles)!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.setmodeand the request is rejected withFAIL: 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_modetable 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:
- Whitelist Mode = the front door. If it kicks you, you never reach the lobby โ Hosting Permissions is irrelevant for you.
- 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
restart raycin_races.
Scenario walkthroughs โ step by step¶
Scenario A โ "I want my test player Trench to be able to host"¶
- Open Raycin Menu โ ๐ฌ Dev Tools โ ๐ Hosting Permissions.
- Pick ๐ Open to everyone.
- (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"¶
- Open Raycin Menu โ ๐ฌ Dev Tools โ ๐ค Set Player Role.
- Find Trench in the list, scroll the role to drivers, press Enter to apply.
- Open Raycin Menu โ ๐ฌ Dev Tools โ ๐ Hosting Permissions โ ๐ข Whitelist (roles).
- 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"¶
- Pre-event: assign Crew / Drivers roles via ๐ค Set Player Role (or web Apply).
- Open ๐ก Whitelist Mode โ pick ๐ Drivers Only. Currently-connected non-drivers get a 30-second warning then get kicked.
- Open ๐ Hosting Permissions โ leave at ๐ข Whitelist (roles) so only your approved members can host.
- After the event: ๐ก Whitelist Mode โ ๐ Everyone to reopen the server.
Scenario D โ "I'm closing the server for maintenance, only I should be in"¶
- Open ๐ก Whitelist Mode โ ๐ Admin Only.
- Open ๐ Hosting Permissions โ ๐ง ACE-only.
- All non-admins get kicked at the connection screen; nobody else can host.
- Don't forget to flip both back when you reopen.
Scenario E โ "A friend joined and says 'You don't have permission to host'"¶
- Check Raycin Menu โ ๐ Hosting Permissions: is it on Whitelist / ACE-only / Strict?
- 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).
- 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.
- Watch the server console for the diagnostic line: That tells you immediately which gate denied them.
Scenario F โ "A friend can't even connect to the server"¶
- Check Raycin Menu โ ๐ก Whitelist Mode. If it's anything other than ๐ Everyone, they need a whitelist row.
- Use ๐ค Set Player Role to give them an appropriate role โ they need to reconnect after you do this.
- Or switch Whitelist Mode โ ๐ Everyone if you want unrestricted joining.
- Check the FiveM server console โ the rejection reason is logged
(
Whitelist mode: Drivers Onlyetc.).
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¶
- Add their license to
group.admininserver.cfg(or grantraycin_creator.accessdirectly) - They join โ open chat (
T) โ/raycin_admin_checkโ confirm verdict isALLOW - They open Raycin Menu (
F10) โ Racing Lobby โ Dev Tools should NOT be greyed - Each Dev Tools item works (Show License, Restart, Force-unstick, List rooms, Hosting Permissions, Whitelist Mode)
- Discord audit channel logs the join + any mode changes they make