Skip to main content

Installation

Step 1: Web Panel Setup

  1. Upload Files
    • Upload the contents of Web UI to your web server
    • Ensure the uploads folder is writable (chmod 755 or 775)
  2. Run Installer
    • Navigate to https://your-domain.com/install/install.php
    • Enter your license key
    • Configure database connection
    • Set up Discord OAuth2 (see Discord Setup below)
    • Enter your Super Admin Discord Role ID
    • Save the API Token shown at the end
  3. Delete Install Folder
    • After installation, delete the /install folder for security

Step 2: Discord Application Setup

  1. Go to Discord Developer Portal
  2. Click New Application and give it a name
  3. Go to OAuth2General
  4. Copy the Client ID and Client Secret
  5. Add a redirect URI: https://your-panel-url.com/callback
  6. Go to Bot → Click Add Bot
  7. Copy the Bot Token
  8. Enable Server Members Intent under Privileged Gateway Intents
  9. Invite the bot to your Discord server with these permissions:
    • Read Messages/View Channels
    • Send Messages (for logging)

Step 3: FiveM Resource Setup

  1. Copy Resource
    • Copy the LonexStaff folder to your server’s resources folder
  2. Configure
    • Open LonexStaff/config.lua
    • Set your panel URL and API token:
    Config.PanelURL = "https://your-panel-url.com"
    Config.APIToken = "your-api-token-here"
    
  3. Add to Server Config
    • Add to your server.cfg:
    ensure LonexStaff
    
  4. Restart Server
    • Restart your FiveM server

Configuration

Web Panel Settings

Access Settings in the web panel to configure:
SettingDescription
Server NameYour server’s display name
TimezoneTimezone for displaying dates
Discord Bot TokenFor role verification and logging
Discord Guild IDYour Discord server ID
Trust ScoreConfigure deduction/addition values
Warning PointsEnable automatic escalation

FiveM Config Options

Edit config.lua:
Config.OpenMenuCommand = "staffmenu"    -- Command to open menu
Config.OpenMenuKey = "F3"               -- Key binding (or false to disable)
Config.RequireDutyForMenu = true        -- Require /staffduty first
Config.NoclipKey = "F2"                 -- Noclip toggle key
Config.ReportCommand = "report"         -- Player report command
Config.CallAdminCommand = "calladmin"   -- Call admin command
Config.Debug = false                    -- Enable console logging

Staff Commands

CommandDescription
/staffdutyToggle staff duty mode
/staffmenuOpen the staff menu
/staffrefreshReload permissions from panel
/report [id] [reason]Report a player (for players)
/calladmin [message]Call for staff assistance

In-Game Staff Menu

Press F3 (while on duty) to open the staff menu:
  • Players Tab - View online players, take actions
  • Reports Tab - View and manage player reports
  • Calls Tab - View and respond to admin calls
  • Tools Tab - Quick actions (heal, vehicle spawn, noclip)

Available Actions

ActionDescription
FreezeFreeze/unfreeze a player
WarnIssue a warning
KickKick from server
Temp BanTemporary ban (configurable duration)
BanPermanent ban
Go ToTeleport to player
BringTeleport player to you
SpectateWatch a player (press E to exit)
Heal SelfRestore your health
Spawn VehicleSpawn a vehicle

Role Permissions

Configure roles in Settings → Roles:

Panel Permissions

  • panel.access - Access the web panel
  • panel.view_players - View player list
  • panel.view_staff - View staff list
  • panel.view_logs - View audit logs
  • panel.manage_roles - Create/edit roles
  • panel.manage_settings - Edit settings

Action Permissions

  • actions.freeze - Freeze players
  • actions.warn - Issue warnings
  • actions.kick - Kick players
  • actions.tempban - Temporary bans
  • actions.permban - Permanent bans
  • actions.unban - Lift bans
  • actions.teleport - Teleport actions
  • actions.noclip - Use noclip
  • actions.spectate - Spectate players
  • actions.heal - Heal self
  • actions.vehicle - Spawn vehicles
  • actions.announcement - Server announcements

View Permissions

  • view.identifiers - View player identifiers
  • view.ip_addresses - View IP addresses
  • view.hardware_tokens - View hardware tokens

Discord Logging

Configure logging channels in Settings → Discord:
Event TypeDescription
player_banBan notifications
player_kickKick notifications
player_warnWarning notifications
player_unbanUnban notifications
staff_actionGeneral staff actions
report_createdNew reports
report_resolvedResolved reports

Troubleshooting

Panel won’t load

  • Check PHP version (8.1+ required)
  • Verify .htaccess is working (Apache)
  • Check file permissions on uploads folder

API connection failed

  • Verify Config.PanelURL has no trailing slash
  • Check Config.APIToken matches panel
  • Ensure your server can reach the panel URL
  • Check for CloudFlare/WAF blocking API requests

Discord login not working

  • Verify redirect URI matches exactly
  • Check Client ID and Secret are correct
  • Ensure bot is in your Discord server

Players not showing

  • Wait for players to connect (data syncs on join)
  • Check server console for API errors
  • Verify database connection

Staff menu not opening

  • Ensure you’re on duty (/staffduty)
  • Check you have a role with panel access
  • Use /staffrefresh to reload permissions

Support

For support, please contact us through:

License

LonexStaff is licensed software. Each license key is valid for one installation.