๐ชช FX-IDCARD โ
Advanced ID card system for RedM with photo capture, printing system, metadata/SQL modes, and full framework compatibility.
๐ฆ INSTALLATION โ
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 โ
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 โ
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 โ
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 โ
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 โ
Config.Language = "en"
Config.TakeCardType = "item"
Config.ShowIdcardCommand = "idcard"โข Language โ system language โข TakeCardType โ "item" or "sql" โข ShowIdcardCommand โ used for SQL mode
๐ฏ CARD TYPE SYSTEM โ
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 โ
Config.Keybinds = {
["takephoto"] = 0x760A9C6F,
["printphoto"] = 0xC7B5340A,
["takeidcard"] = 0x2CD5343E,
}โข Defines player controls โข takephoto โ opens camera โข printphoto โ prints photo โข takeidcard โ creates ID card
๐ธ PHOTO SYSTEM โ
Config.Photographers = {
["Blackwater"] = {
promptCoords = vector4(...),
pedCoords = vector4(...),
camCoords = vector4(...),
}
}โข Defines photographer locations โข Players take photo here โข Camera fully customizable
๐ท ID CARD NPC SYSTEM โ
Config.IDCardNPC = {
["Blackwater"] = {
coords = vector4(...),
models = "cs_brontesbutler",
distance = 3,
}
}โข NPC used to create ID card โข Players interact to open system
timeSettings = {
open = 8,
close = 21,
}โข Restricts usage by time โข Example โ only daytime access
illegal = trueโข Enables illegal ID system โข Can create fake identity
๐ฐ PRICE SYSTEM โ
Config.Prices = {
printphoto = 5,
idcard = 50,
illegal = 100,
}โข Defines system costs โข Set false โ free usage
๐ ITEM SETTINGS โ
Config.PrintPhotoItem = "printphoto"
Config.ManIdCardItem = "man_idcard"
Config.WomanIdCardItem = "woman_idcard"โข Defines item names โข Must match database items
โฑ๏ธ PHOTO TIME SYSTEM โ
Config.SelectPhotoTime = 30โข Time limit to select photo โข Prevents abuse
๐๏ธ SHOW SYSTEM โ
Config.ShowDistance = 1.5โข Distance to show ID card โข Used for nearby players
๐ท NPC SPAWN SYSTEM โ
Config.PedSpawnDistance = 30โข NPC spawn distance โข Improves performance
๐ NOTIFY SYSTEM โ
Notify({
text = "ID Card Created",
type = "success"
})โข Framework-based notification system โข Supports VORP / RSG
๐ฎ CLIENT EVENT โ
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
