Installation

STEP 1 - Dependencies

Dependencies: It is important to use the dependencies that are indicated in this step, do not use others, otherwise you will receive critical errors

STEP 2 - Start order

Add ensure deluxe_idcard to your server.cfg and make sure that you run it after screenshot-basic and ox_inventory

ensure screenshot-basic
ensure ox_inventory
ensure deluxe_idcard

STEP 3 - Script Config

You can fully configure the script based on what your server needs. Here you can find a detailed explaination about all the possible configuration that you can use.

```lua
Config = {}

--[[ Debug mode (Enable only if you run into issues otherwise keep to false) ]] --
Config.Debug = false

--[[ Webhook Config (To take document pictures) ]] --
Config.Webhook = 'https://discord.com/api/webhooks/882295355335671888/SO4IwWVKr8_p76NCx9dc6amlOt05fOj46UP-Zz1BpdIxxXO3MPEEFxQ3DP5mAALF991q' -- Put here your discord webhook otherwise pictures won't be taken

--[[ FRAMEWORK SETTINGS ]] --
Config.Framework = 'esxnew' --[[ Available: esx | esxnew . If you use es_extended above 1.8 , use: esxnew . At the moment the script only supports the ESX Framework. QB-Core version will be released soon
                              Make sure to remove the comment lines:  --'@es_extended/imports.lua', in the fxmanifest.lua if you are using esxnew legacy version. ]]

--[[ DOCUMENT SETTINGS ]] --
Config.Documents = {
    idcard = {
        documentname = 'idcard', -- The item name of your main gouvernment card
        label = 'Identity Card', -- The label of the document type to show in the UI
        document_prefix = 'GOV' -- Prefix for the back card number (for id card)
    },

    drivingcard = {
        documentname = 'drivingcard', -- The item name of your main gouvernment card
        label = 'Driving Card', -- The label of the document type to show in the UI
        document_prefix = 'DRIV' -- Prefix for the back card number (for driving card)
    },

    huntingcard = {
        documentname = 'huntingcard', -- The item name of your main gouvernment card
        label = 'Hunting Card', -- The label of the document type to show in the UI
        document_prefix = 'HUNT' -- Prefix for the back card number (for hunting card)
    }
}

Config.AdminCommand = {
    enabled = true, -- Enable admin command to create documents for online players
    command = 'createdocument', --[[ The command to create documents (if enabled), you can change it. Usage: "/createdocument type playerid" 
                                    Types available: Types are te documentname of each item. Example: /createdocument idcard playerid]]
    allowed_groups = {"superadmin", "admin"} -- You can add any group you want to authorize for creating documents
}

--[[ MISC SETTINGS ]] --
Config.Settings = {
    keybindclosedocuments = 'BACK', -- If you want to change default key: https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
    closecommand = '_CloseDocuments', -- The command to close documents when watching them
    keymappingdescription = 'Close documents' -- Description for FiveM keybinding
}

--[[ TRANSLATIONS ]] --
Config.Translation = {
    ["usage_command"] = "[Admin] Use: /createcommand 'id' 'type' to give documents",
    ["height"] = "%s CM", -- Keep the % for the value
}

---@param EXPORTS | Read here for understanding how to create documents through your scripts
--[[ 
    Export is available , you can use it in any of your script to create any document.

    Export function: exports["deluxe_idcard"]:CreateDocumentExport(document)
    The (document) argument should be a string containing the document type that you want to create.
    This should be called through a client sided script but can also be called from server side.
--]]
```

Last updated