Logs & Security
shared/server/config.lua, server only, never sent to clients.
๐ Logging
ServerConfig.Logs = {
service = 'discord', -- 'discord' | 'ox_lib' | 'both' | false
name = 'Kartik EMS',
avatar = '',
webhooks = { ... },
}A separate webhook per category, so you can route each one to the right channel:
| Webhook | Logs |
|---|---|
default | Anything without its own webhook |
death | Players going down and dying |
revive | Revives, by whom |
treatment | Treatments and medications given |
prescription | Prescriptions issued and revoked |
records | Record edits and deletions |
billing | Bills sent and paid |
admin | Every admin action |
creator | Hospital creator changes |
aipatients | AI callouts taken and resolved |
pager | EMS group channel messages |
permadeath | Final kill approvals, kills and restores |
Leave a webhook empty and it falls back to default.
Set service = 'ox_lib' to use whatever logger ox_lib is configured for in your convars, or 'both' to send to Discord and ox_lib at once.
๐ก๏ธ Anti-abuse
ServerConfig.Security = {
maxInteractDistance = 6.0,
treatmentCooldown = 1500,
damageReportsPerSecond = 12,
kickOnExploit = false,
}| Setting | |
|---|---|
maxInteractDistance | Maximum distance between medic and patient for any medical action. Server-enforced |
treatmentCooldown | Milliseconds between treatments from the same medic |
damageReportsPerSecond | Rate limit on damage events from one client |
kickOnExploit | Kick players who trigger protected events with invalid data |
kickOnExploit is off by default because a badly behaved third-party resource can trip it. Turn it on once you are confident nothing legitimate is triggering it, and watch your logs first.
Client revive events
See General & Compatibility. By default legacy client revive events only work with an admin or on-duty medic within 10 m.
๐๏ธ Database
ServerConfig.AutoDatabase = true
ServerConfig.RecordRetentionDays = falseAutoDatabase | Creates and migrates tables on start. Turn off only if your DB user cannot create tables, then import install/database.sql manually |
RecordRetentionDays | Days to keep medical records. false = forever |
See Database.
๐ Version check
ServerConfig.VersionCheck = {
enabled = true,
url = '',
}Point it at a URL returning either plain text:
1.2.0or JSON:
{ "version": "1.2.0", "changelog": "Added the morgue system" }The result is printed to your server console on start. Set enabled = false to skip the check entirely.