LR-ID | Identification Script

:fleur_de_lis: LR: ID Cards :fleur_de_lis:

Bring immersion, authenticity, and utility to your RedM server with a fully featured identification system. From registering a legal identity with clerks across the states to carrying a physical ID item with a scannable number, this script is built for serious roleplay with robust UX, logging, and deep configuration.

:movie_camera: Showcase: Watch Here
:shopping_cart: Store: Legends Studio Tebex
:speech_balloon: Support: Legends Studio Discord


:sparkles: Features at a Glance

:classical_building: Dynamic Registration Offices

  • Configurable city offices (Valentine, Blackwater, Saint Denis, Rhodes, Annesburg, Strawberry, Van Horn, Armadillo, Tumbleweed)
  • NPC clerks with fallback models
  • Automatic office hours with synced blips & NPC availability
  • Clean blips with proper sprites, scaling, and colors

:id_button: Authentic ID System

  • Register with Name, DOB, Height, Eye/Hair Color, Marks, Residence, and Photo
  • Era-based ID format: PREFIX–YEAR–NUMBER (e.g., NH-1885-00042)
  • Per-city registrations & pricing
  • Buy replacement copies directly at the office

:briefcase: Usable Inventory Item

  • VORP item id_card with DB-linked metadata
  • Use to view or show ID to nearby players
  • Metadata verification prevents spoofing

:camera_with_flash: Immersive Photo Studio

  • Take immersive in-game ID photos with camera & lighting controls
  • Supports hosted image URLs (Discord/Imgur/CDN)
  • Strict validation & safe cleanup

:bell: Discord Logging

  • Configurable webhooks & styled embeds
  • Logs: new IDs, copies purchased, admin actions, errors

:globe_with_meridians: Multi-language Support

  • Locale framework (English included)

:gear: Configuration Options

  • Toggle debug mode
  • Set current era year (affects ID formatting)
  • Customize city prices, NPCs, hours, prompts & blips
  • Residence → Prefix mapping (e.g., Valentine → NH)
  • Adjustable keybinds

:shield: Security & Stability

  • URL/domain/extension validation
  • Metadata verification
  • Anti-spam & safe fallbacks
  • Robust cleanup of cameras, prompts & props

:scroll: Example Config & Logs

Config = {}

Config.Debug = false
Config.Lang = 'en'
Config.CurrentEraYear = 1885
Config.CopyPrice = 5
Config.itemName = "id_card"
Config.Keys = {
    E = 0x41AC83D1,
    R = 0xE3BF959B,
    G = 0xA1ABB953,
    F = 0x26A18F47,
    enter = 0x43DBF61F,
    cancel = 0x3F4DC0EF,
    close = 0x156F7119,
}

Config.ResidenceToPrefix = {
    ['Valentine'] = 'NH', ['Van Horn'] = 'NH', ['Annesburg'] = 'NH',
    ['Blackwater'] = 'WE', ['Strawberry'] = 'WE',
    ['Rhodes'] = 'LE', ['Saint Denis'] = 'LE',
    ['Tumbleweed'] = 'NA', ['Armadillo'] = 'NA'
}

Config.Register = {
    Valentine = {
        name = "Valentine Clerk Office",
        location = vector3(-174.3, 633.3, 114.1),
        city = "Valentine",
        description = "New Hanover County Clerk Office",
        promptTitle = "Valentine Clerk Office",
        enableblip = true,
        blips = -1747825963,
        blipColorOpen = joaat('BLIP_MODIFIER_MP_COLOR_32'),
        blipColorclose = joaat('BLIP_MODIFIER_LOCKED'),
        blipName = "Valentine Clerk Office",
        NpcAllowed = true,
        NpcModel = "u_m_m_rhdtrainstationworker_01",
        NpcPosition = vector4(-175.3, 632.0, 113.04, 319.25),
        OfficeHoursAllowed = true,
        OfficeOpen = 7,
        OfficeClose = 22,
        distOpen = 2.5,
        price = 5.00 
    },
}
Logs = {}

Logs.EnableDiscordLogs = true
Logs.Webhooks = {
    idCreation = "",
    idCopyPurchase = "",
    general = ""
}

Logs.BotSettings = {
    name = "ID Card Registration",
    avatar = ""
}

Logs.Colors = {
    success = 3066993,
    warning = 16776960,
    error = 15158332,
    info = 3447003
}

Logs.Types = {
    ID_CREATED = {
        enabled = true,
        webhook = "idCreation",
        color = "success",
        title = "🆔 New ID Card Created"
    },
    ID_COPY_PURCHASED = {
        enabled = true,
        webhook = "idCopyPurchase", 
        color = "info",
        title = "📋 ID Card Copy Purchased"
    },
    ID_SYSTEM_ERROR = {
        enabled = true,
        webhook = "general",
        color = "error",
        title = "❌ ID System Error"
    },
    ID_ADMIN_ACTION = {
        enabled = true,
        webhook = "general",
        color = "warning",
        title = "⚠️ ID Admin Action"
    }
}

:pushpin: Resource Information

Code is accessible No (Escrow Protected)
Subscription-based No
Lines (approximately) ~2000+
Requirements VORP Framework, MySQL
Support Yes (Discord)

:fleur_de_lis: Step into the era of identity – bring realism to your server today with Legends: ID Cards!

v1.0.4 — Business Registration Update

NEW

  • Business Registration is now fully functional: registrar office blips, NPCs, prompts, registration UI with auto-filled owner info, server-side persistence, business license inventory item (view + show to nearby player), validation (ID required, item required, business limits, funds) and Discord logging.
  • Full UI localization — the entire on-screen UI (ID form, ID card, business form and license) is now translatable. Languages split into separate files (en.lua, es.lua).
  • Rebuilt browser preview with a collapsible control panel and live English/Espanol switcher.

FIXES

  • Fixed “Confirm does nothing” — validation errors now stay on screen with a clear reason instead of silently bouncing back to the form.
  • Removed alert() from the NUI (it hard-freezes RedM). Preview validation now shows an on-screen message and highlights missing fields in red.
  • Date of Birth switched to US format MM / DD / YYYY; parser accepts / - . or spaces.
  • Config.CurrentEraYear set to 1899 so realistic birth years are no longer rejected.
  • Server-side photo safety: invalid/missing photo is rejected cleanly instead of hanging the UI.

UPDATING FROM 1.0.3

  1. Back up shared/config.lua and shared/logs.lua, then replace the whole lr-id folder.
  2. Restore your logs.lua, and merge your old settings into the NEW shared/config.lua (it adds Config.BusinessRegistration and Config.RegistrarOffices).
  3. Run this SQL:
    INSERT INTO items (item, label, limit, can_remove, type, usable, desc)
    VALUES (‘business_license’, ‘Business License’, 5, 1, ‘item_standard’, 1, ‘Official business registration license’);
  4. Restart the server — the business_licenses table is created automatically.

Note: shared/logs.lua and html/images/ are unchanged. Old custom language files must be re-translated from the new languages/en.lua (many new nui_* keys).