If you have purchased the escrow version of the resource, you will have access to support via ticket, we remind you that this resource currently only works with ox_inventory and quasar inventory metadata
This script need to be configurated, is not plug and play, then first of all go to the config.lua and choose you inventory and other config as you like
Image upload (IMPORTANT)
in order to make pictures of document work, you have to set-up an image uploader, by imageuploader.lua file
if you use discord, set as a system "discord" and set below the webhook (remember that discord delete pictures after a 1/2 days)
if you use fivemanage, set as a system "fivemanage" and set below the token
if you want use a custom system, there is an example of how you can do that.
Im using ox_inventory
add this in the item storange of ox inventory
['documents'] = {
label = 'ID Card',
weight = 0.03,
stack = true,
close = true,
},
['drive'] = {
label = 'Drive License',
weight = 0.03,
stack = true,
close = true,
},
['plane'] = {
label = 'Drive License',
weight = 0.03,
stack = true,
close = true,
},
['boat'] = {
label = 'Drive License',
weight = 0.03,
stack = true,
close = true,
},
['weapon'] = {
label = "Weapon License",
weight = 0.03,
stack = true,
close = true,
},
['cryptostick'] = {
label = 'crypto stick',
weight = 200,
stack = true,
close = true,
description = "Why would someone ever buy money that doesn't exist.. How many would it contain..?"
},
Im using qs-inventory or qb-inventory or lj-inventory
Add this item in qs inventory or in qb / lj inventory
Go to the CloseAfterUse config and replace with this line or add in the table the following items
"documents", "weapon", "drive", "plane", "boat"
I have date of birth error, how can i fix?
if you have this error, or a similar error remember to check the config.js
check the config.js
Select the right data format and the right data separator according to the examples
How can i give the weapon license menu to my police script?
License menu trigger:
TriggerEvent('fnx_idCard:weaponLicense')
if you want the trigger to give and retrive the license without open the menu, see the following code lines
To give:
-- esx
local c, dis = ESX.Game.GetClosestPlayer()
TriggerServerEvent("fnx_idCard:givefirearm", GetPlayerServerId(c))
-- qbcore
local c, dis = QBCore.Functions.GetClosestPlayer()
TriggerServerEvent("fnx_idCard:givefirearm", GetPlayerServerId(c))
To retrive:
-- esx
local c, dis = ESX.Game.GetClosestPlayer()
TriggerServerEvent("fnx_idCard:retirefirearm", GetPlayerServerId(c))
-- qbcore
local c, dis = QBCore.Functions.GetClosestPlayer()
TriggerServerEvent("fnx_idCard:retirefirearm", GetPlayerServerId(c))
To give the license to yourself, not to the nearest player (for ESX and QBCORE):
-- give
TriggerServerEvent("fnx_idCard:givefirearm", GetPlayerServerId(PlayerId()))
-- retrive
TriggerServerEvent("fnx_idCard:retirefirearm", GetPlayerServerId(PlayerId()))
example in policejob
How can i trigger the illegal dialog?
This is the trigger to open the document forgery menu, the topic and to whom the menu should be opened.
local args = source -- server id player
TriggerClientEvent('fnx_idcard:dialogIllegal', args)
How can i update the photo by trigger?
This is the trigger to update a person's photo, this person updates it directly in the database
-- event registered
RegisterServerEvent('fnx_idcard:updatePhoto',function(link)
local source = source
local xPlayer = ServerGetPlayer(source)
MySQL.Async.execute('UPDATE users SET idCardPhoto = ? WHERE identifier = ?', {link, xPlayer.identifier})
end)
-- how to trigger
link = "" -- link of the new picture
TriggerServerEvent('fnx_idcard:updatePhoto', link)
-- example in a command
RegisterCommand('updatephoto', function(arg)
if arg[1] ~= nil then
TriggerServerEvent('fnx_idcard:updatePhoto', arg[1])
else
print('You miss the argument for this command.')
end
end
How can i open the document creation menu?
Here you will find the trigger to open the photo creation menu, and you can integrate it and place it wherever you want.
-- to open the ID document creation menu
TriggerEvent('fnx_idcard:takePhotoMoveCam')
You can use this trigger in qb-cityhall to make the photo and give the documents
How can i give the drive license to a player?
The licenses that the player owns are automatically detected by the esx_license, in the user_license table
-- ESX
local c, dis = ESX.Game.GetClosestPlayer()
TriggerServerEvent("fnx_idcard:giveDriveLicenseToPlayer",GetPlayerServerId(c))
-- QBCORE
local c, dis = QBCore.Functions.GetClosestPlayer()
TriggerServerEvent("fnx_idcard:giveDriveLicenseToPlayer",GetPlayerServerId(c))
How can i give the license to myself? (SAME FOR ESX AND QBCORE)
test = name of the item, illegalallowed = if must be or not in the fake document menu, bg = image background of the item
How can i give and retrive a document plus?
To create a document plus, you have to follow the guide lines in the config.lua, after that all was created.
When you have created the document plus, to give it, you must use this trigger, that you can implement in your menu or command etc etc:
-- ESX
local c, dis = ESX.Game.GetClosestPlayer() -- id of the player that you want give the license
local license = "plane" -- name of the license
TriggerServerEvent("fnx_idCard:giveDocumentPlus", GetPlayerServerId(c),license)
-- QBCORE
local c, dis = QBCore.Functions.GetClosestPlayer()
local license = "plane" -- name of the license
TriggerServerEvent("fnx_idCard:giveDocumentPlus", GetPlayerServerId(c),license)
to retrive, just use this trigger with the right target
-- ESX
local c, dis = ESX.Game.GetClosestPlayer() -- id of the player that you want give the license
local license = "plane" -- name of the license
TriggerServerEvent("fnx_idCard:retireDocumentPlus",GetPlayerServerId(c),license)
-- QBCORE
local c, dis = QBCore.Functions.GetClosestPlayer()
local license = "plane" -- name of the license
TriggerServerEvent("fnx_idCard:retireDocumentPlus",GetPlayerServerId(c),license)
After, go to the config.lua, test is the name of the item