FX-IDCARD

Advanced ID card system for RedM with photo capture, printing system, metadata/SQL modes, and full framework compatibility.

3 min readupdated 3 Jun 2026

FX-IdcardFreeView in store
On this page 20
  1. INSTALLATION
  2. DEPENDENCIES
  3. SQL INSTALLATION
  4. VORP ITEM INSTALL
  5. RSG ITEM INSTALL
  6. BASIC CONFIG
  7. CARD TYPE SYSTEM
  8. KEY SYSTEM
  9. PHOTO SYSTEM
  10. ID CARD NPC SYSTEM
  11. PRICE SYSTEM
  12. ITEM SETTINGS
  13. PHOTO TIME SYSTEM
  14. SHOW SYSTEM
  15. NPC SPAWN SYSTEM
  16. NOTIFY SYSTEM
  17. CLIENT EVENT
  18. IMPORTANT NOTES
  19. COMMON MISTAKES
  20. SUMMARY

#📦 INSTALLATION

bashensure fx-idcard
  • Place the script inside resources/fx-idcard
  • Add ensure fx-idcard to your server.cfg
  • Restart your server
  • Make sure oxmysql is started before this script

#⚙️ DEPENDENCIES

textoxmysql (Required)
  • Used for database communication
  • Script will not work without it
  • You can use tools like HeidiSQL or phpMyAdmin to manage your database

#🗄️ SQL INSTALLATION

sqlCREATE TABLE IF NOT EXISTS `fx_idcard` (
  `charid` varchar(50) DEFAULT NULL,
  `data` longtext DEFAULT NULL
);
  • Stores ID card data per player
  • Required if using SQL mode
  • Saves generated ID cards

#📦 VORP ITEM INSTALL

sqlINSERT INTO `items` (...)
VALUES
('man_idcard', 'ID Card', ...),
('woman_idcard', 'ID Card', ...),
('printphoto', 'Print Photo', ...)
  • Required items for ID system
  • printphoto → required to create ID card
  • man_idcard / woman_idcard → ID card items

#📦 RSG ITEM INSTALL

luaman_idcard = { name = 'man_idcard', label = 'Man Idcard', unique = true, useable = true },
woman_idcard = { name = 'woman_idcard', label = 'Women Idcard', unique = true, useable = true },
  • Required if using RSG framework
  • Items must be usable
  • Unique recommended

#⚙️ BASIC CONFIG

luaConfig.Language = "en"
Config.TakeCardType = "item"
Config.ShowIdcardCommand = "idcard"
  • Language → system language
  • TakeCardType → "item" or "sql"
  • ShowIdcardCommand → used for SQL mode

#🎯 CARD TYPE SYSTEM

luaConfig.TakeCardType = "item"
  • item → gives ID card as inventory item
  • sql → stores ID in database
  • SQL mode allows only one ID per player

#🎮 KEY SYSTEM

luaConfig.Keybinds = {
    ["takephoto"] = 0x760A9C6F,
    ["printphoto"] = 0xC7B5340A,
    ["takeidcard"] = 0x2CD5343E,
}
  • Defines player controls
  • takephoto → opens camera
  • printphoto → prints photo
  • takeidcard → creates ID card

#📸 PHOTO SYSTEM

luaConfig.Photographers = {
    ["Blackwater"] = {
        promptCoords = vector4(...),
        pedCoords = vector4(...),
        camCoords = vector4(...),
    }
}
  • Defines photographer locations
  • Players take photo here
  • Camera fully customizable

#🪪 ID CARD NPC SYSTEM

luaConfig.IDCardNPC = {
    ["Blackwater"] = {
        coords = vector4(...),
        models = "cs_brontesbutler",
        distance = 3,
    }
}
  • NPC used to create ID card
  • Players interact to open system

luatimeSettings = {
    open = 8,
    close = 21,
}
  • Restricts usage by time
  • Example → only daytime access

luaillegal = true
  • Enables illegal ID system
  • Can create fake identity

#💰 PRICE SYSTEM

luaConfig.Prices = {
    printphoto = 5,
    idcard = 50,
    illegal = 100,
}
  • Defines system costs
  • Set false → free usage

#🎒 ITEM SETTINGS

luaConfig.PrintPhotoItem = "printphoto"
Config.ManIdCardItem = "man_idcard"
Config.WomanIdCardItem = "woman_idcard"
  • Defines item names
  • Must match database items

#⏱️ PHOTO TIME SYSTEM

luaConfig.SelectPhotoTime = 30
  • Time limit to select photo
  • Prevents abuse

#👁️ SHOW SYSTEM

luaConfig.ShowDistance = 1.5
  • Distance to show ID card
  • Used for nearby players

#🧍 NPC SPAWN SYSTEM

luaConfig.PedSpawnDistance = 30
  • NPC spawn distance
  • Improves performance

#🔔 NOTIFY SYSTEM

luaNotify({
  text = "ID Card Created",
  type = "success"
})
  • Framework-based notification system
  • Supports VORP / RSG

#🎮 CLIENT EVENT

luaTriggerClientEvent("fx-idcard:client:showIDCardSQL")
  • Displays ID card UI
  • Used for SQL mode

#⚠️ IMPORTANT NOTES

  • oxmysql must be running
  • Items must exist in database
  • Print photo required before ID creation
  • SQL table required for SQL mode
  • Config.TakeCardType must be correct

#🚨 COMMON MISTAKES

  • Missing printphoto item
  • Wrong item names
  • Not importing SQL
  • Using SQL mode without table
  • NPC not spawning (wrong coords)

#🏁 SUMMARY

FX-IDCARD provides:

  • Photo-based ID system
  • Metadata & SQL support
  • NPC interaction system
  • Illegal ID system
  • Full framework compatibility

© Fixitfy Development