Legacy Scripts

legacy-idcard

Configuration

All config.lua keys and their defaults.

Configuration

All configuration lives in config.lua, loaded as a shared script.

Key Type Default Description
Config.Version string '1.0.0' Resource version string. Informational only.
Config.Locale string 'en' Locale identifier used to load strings via legacy-lib's locale loader / locales/en.json.
Config.Debug boolean false Enables debug console output throughout the resource.
Config.AdminGroups table (array of strings) { 'god', 'admin' } ACE permission group names treated as admin for /idadmin and all admin callbacks (getAdminData, createCardType, updateCardType, deleteCardType, searchPlayers, revokePlayerCard, getCardTypes).
Config.ShowDistance number 2.0 Max distance between players for a shown card to also be displayed to the nearest nearby player.
Config.CloseKey string 'Escape' Key name sent to the NUI frontend to close the displayed card.
Config.AutoClose table { enabled = true, time = 8000 } Controls auto-closing of the card view. time is in milliseconds.
Config.Webhooks table { CardIssued = '', CardRevoked = '', TypeCreated = '', TypeDeleted = '' } Discord webhook URLs per event. Leave a URL as '' to disable that specific webhook.

Notes

  • Card types themselves (id_card, driver_license, etc.) are not configured in config.lua — they live entirely in the legacy_card_types database table, managed via /idadmin or direct SQL.
  • Config.AutoClose.time is milliseconds, not seconds — a common source of misconfiguration.
  • Config.Webhooks entries are disabled with an empty string (''), not by removing the key or setting it to nil/false.
  • If your server's ACE groups don't match god/admin, update Config.AdminGroups or you will be locked out of /idadmin.