Skip to Content

Server Configuration

Server-side configuration is in server/config.lua. This file controls Discord webhooks and application limiting.

Discord Webhooks

You can route whitelist job applications to Discord in two ways:

Global Webhook

A single webhook URL that receives all job applications:

ServerConfig.DiscordWebhook = 'https://discord.com/api/webhooks/your-global-webhook'

Per-Job Webhooks

Route each job’s applications to a different Discord channel. Jobs not listed here fall back to the global webhook.

ServerConfig.JobWebhooks = { ['police'] = 'https://discord.com/api/webhooks/your-police-webhook', ['ambulance'] = 'https://discord.com/api/webhooks/your-ems-webhook', ['mechanic'] = 'https://discord.com/api/webhooks/your-mechanic-webhook', }

To create a webhook in Discord: Server SettingsIntegrationsWebhooksNew Webhook.

Application Limiting

Controls how often players can submit whitelist applications.

SettingTypeDescription
ServerConfig.ApplicationLimitModestring'cooldown' or 'database'
ServerConfig.ApplicationCooldownnumberSeconds between applications (cooldown mode only)

Cooldown Mode

Players can re-apply after a set time. The timer is stored in memory and resets on server restart.

ServerConfig.ApplicationLimitMode = 'cooldown' ServerConfig.ApplicationCooldown = 300 -- 5 minutes

Database Mode

Players can only apply once across all whitelist jobs. The record is stored permanently in the database until you manually reset it.

ServerConfig.ApplicationLimitMode = 'database'

Resetting Applications

To allow a player to re-apply, run one of these SQL commands:

Reset a specific player:

UPDATE flux_job_applications SET can_apply = 1 WHERE identifier = 'CITIZEN_ID_HERE';

Delete a player’s record entirely:

DELETE FROM flux_job_applications WHERE identifier = 'CITIZEN_ID_HERE';

Full Example

ServerConfig = {} -- Global fallback webhook -- ServerConfig.DiscordWebhook = 'YOUR_GLOBAL_WEBHOOK_URL_HERE' -- Per-job webhooks ServerConfig.JobWebhooks = { ['police'] = 'YOUR_POLICE_WEBHOOK_URL_HERE', ['ambulance'] = 'YOUR_AMBULANCE_WEBHOOK_URL_HERE', } ServerConfig.ApplicationLimitMode = 'database' ServerConfig.ApplicationCooldown = 300
Last updated on