Skip to content

๐Ÿชช FX-IDCARD โ€‹

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


๐Ÿ“ฆ INSTALLATION โ€‹

bash
ensure 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 โ€‹

text
oxmysql (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 โ€‹

sql
CREATE 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 โ€‹

sql
INSERT 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 โ€‹

lua
man_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 โ€‹

lua
Config.Language = "en"
Config.TakeCardType = "item"
Config.ShowIdcardCommand = "idcard"

โ€ข Language โ†’ system language โ€ข TakeCardType โ†’ "item" or "sql" โ€ข ShowIdcardCommand โ†’ used for SQL mode


๐ŸŽฏ CARD TYPE SYSTEM โ€‹

lua
Config.TakeCardType = "item"

โ€ข item โ†’ gives ID card as inventory item โ€ข sql โ†’ stores ID in database โ€ข SQL mode allows only one ID per player


๐ŸŽฎ KEY SYSTEM โ€‹

lua
Config.Keybinds = {
    ["takephoto"] = 0x760A9C6F,
    ["printphoto"] = 0xC7B5340A,
    ["takeidcard"] = 0x2CD5343E,
}

โ€ข Defines player controls โ€ข takephoto โ†’ opens camera โ€ข printphoto โ†’ prints photo โ€ข takeidcard โ†’ creates ID card


๐Ÿ“ธ PHOTO SYSTEM โ€‹

lua
Config.Photographers = {
    ["Blackwater"] = {
        promptCoords = vector4(...),
        pedCoords = vector4(...),
        camCoords = vector4(...),
    }
}

โ€ข Defines photographer locations โ€ข Players take photo here โ€ข Camera fully customizable


๐Ÿ‘ท ID CARD NPC SYSTEM โ€‹

lua
Config.IDCardNPC = {
    ["Blackwater"] = {
        coords = vector4(...),
        models = "cs_brontesbutler",
        distance = 3,
    }
}

โ€ข NPC used to create ID card โ€ข Players interact to open system


lua
timeSettings = {
    open = 8,
    close = 21,
}

โ€ข Restricts usage by time โ€ข Example โ†’ only daytime access


lua
illegal = true

โ€ข Enables illegal ID system โ€ข Can create fake identity


๐Ÿ’ฐ PRICE SYSTEM โ€‹

lua
Config.Prices = {
    printphoto = 5,
    idcard = 50,
    illegal = 100,
}

โ€ข Defines system costs โ€ข Set false โ†’ free usage


๐ŸŽ’ ITEM SETTINGS โ€‹

lua
Config.PrintPhotoItem = "printphoto"
Config.ManIdCardItem = "man_idcard"
Config.WomanIdCardItem = "woman_idcard"

โ€ข Defines item names โ€ข Must match database items


โฑ๏ธ PHOTO TIME SYSTEM โ€‹

lua
Config.SelectPhotoTime = 30

โ€ข Time limit to select photo โ€ข Prevents abuse


๐Ÿ‘๏ธ SHOW SYSTEM โ€‹

lua
Config.ShowDistance = 1.5

โ€ข Distance to show ID card โ€ข Used for nearby players


๐Ÿ‘ท NPC SPAWN SYSTEM โ€‹

lua
Config.PedSpawnDistance = 30

โ€ข NPC spawn distance โ€ข Improves performance


๐Ÿ”” NOTIFY SYSTEM โ€‹

lua
Notify({
  text = "ID Card Created",
  type = "success"
})

โ€ข Framework-based notification system โ€ข Supports VORP / RSG


๐ŸŽฎ CLIENT EVENT โ€‹

lua
TriggerClientEvent("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

โšก Premium RedM scripts crafted with performance & quality in mind.