F5 StudioF5 Studio
Skip to main content

Admin Panel

The admin console — opened with /redeemadmin — is a full NUI Code Manager for creating and managing codes and browsing the redemption history.

Access Control

The panel is gated server-side. A player gains access if they pass the ACE permission OR belong to a listed framework group:

config/config.lua
F5Cfg.Admin = {
acePermission = 'f5code.admin', -- '' disables the ACE path
frameworkGroups = { 'admin', 'god' }, -- {} disables group-based access
}

Grant the ACE in server.cfg:

server.cfg
add_ace group.admin f5code.admin allow

A non-admin who runs /redeemadmin gets the admin_no_permission notification and the panel never opens. Every mutating action re-checks permission and a per-admin cooldown (actionCooldownMs, default 800 ms) on the server — the client can never bypass it.

Tabs

The console has three tabs:

TabPurpose
Create CodeBuild a new code (also used to edit an existing one)
Active CodesBrowse, search, edit and delete live codes
HistoryBrowse and search the redemption log; clear it

Create Code

Code

Type a code manually, or click Generate for a random one in the format XXXX-XXXX-XXXX (three 4-character groups from an unambiguous alphabet — no I, O, 0 or 1). Codes must be at least minCodeLength characters; duplicates of a live code are rejected (admin_code_exists).

Reward type

A toggle selects what the code grants:

ChoiceStored reward_type
Moneymoney
Itemsitem
Bothboth

Money accounts

When the reward type includes money, one numeric input appears per active money account (Cash, Bank, Crypto, Black Money… depending on your framework — see Framework Compatibility → Money). Enter an amount on any account you want to pay; leave the rest at 0. At least one amount must be > 0, and the total must not exceed F5Cfg.Rewards.maxMoney.

Items

When the reward type includes items:

  • Type an item name (with autocomplete against your inventory's item list) and an amount, then click Add.
  • Add up to F5Cfg.Rewards.maxItems distinct items; each amount is clamped to 1 … maxItemAmount.
  • View Full List opens a searchable modal of every server item to pick from.

Max uses

Total redemptions allowed across all players. 0 = unlimited.

Expiry date

Optional date/time picker. Leave it empty for a code that never expires. After the chosen moment, redeeming returns redeem_expired.

Private code

Toggle Private Code to lock the code to specific players:

  • Add one or more target Citizen IDs (type an ID and add it, or use Choose from list to pick from the online player picker).
  • Up to F5Cfg.Codes.maxPrivateTargets targets.
  • Targets are validated when you save (unless validatePrivateTarget = false). See Features → Target validation.

Online player picker

The Choose from list modal lists online players with their character name, Citizen ID and Steam HEX, searchable by any of those. Selecting a player adds their Citizen ID as a target.

Active Codes

A searchable table of every live code:

ColumnShows
CodeThe code string (click to copy)
TypeMoney / Items / Both
RewardsMoney per account and item list
Usesuses / max_uses (or unlimited)
ExpiryExpiry date, or none
ScopePublic or Private badge
CreatorWho created it (Creator Steam HEX click-to-copy)
ActionsEdit and Delete

The search box filters across codes, rewards, scope and creator.

  • Edit loads the code into the Create tab (now showing Save Changes / Cancel Edit), pre-filling every field so you can adjust and save.
  • Delete asks for a quick confirm, then soft-deletes the code (history is preserved; the name becomes reusable).

History

A searchable log of every redemption:

ColumnShows
CodeThe redeemed code
Redeemed ByPlayer name / Citizen ID (and Steam HEX, click-to-copy)
RewardsMoney and items granted
DateWhen it was redeemed

The search box filters across codes, players, Citizen IDs and Steam HEX. Clear History requires a second confirming click ("Are you sure?") and then deletes all redemption rows — this cannot be undone.

What loads on open

Opening the panel sends the client a single payload: the active codes, the most recent redemption history (up to F5Cfg.Admin.pageSize rows), the full item catalogue (for autocomplete), the active money types, and the locale bundle. Creating, editing or deleting a code refreshes the active-codes list in place.

Discord audit

Every admin action is mirrored to Discord when F5Cfg.Admin.auditWebhook = true and a webhook URL is set: code created, edited, deleted, and history cleared — plus every player redemption. See Webhooks.

See Also