๐Setup
Before starting, you'll need to create the item that you've inserted in your config.lua
file in your inventory system.
We currently support 5 different inventories thanks to alp1x's bridge!
๐งจ ESX
Setup on es_extended is really easy!
Go into your esx_multicharacter server-side file esx_multicharacter\server\main.lua
and replace lines 228 to line 232 with this:
-- esx_multicharacter line 228
AddEventHandler("esx_identity:completedRegistration", function(source, data)
TriggerEvent("esx:onPlayerJoined", source, PREFIX .. awaitingRegistration[source], data)
awaitingRegistration[source] = nil
ESX.Players[GetIdentifier(source)] = true
exports['five-idcard']:CreateMetaLicense(source)
end)
It will automatically give the identity card when the user has just registered.
๐งง QBCore
Go into your qb-multicharacter server-side file qb-multicharacter/server/main.lua
and replace GiveStarterItems
function with this:
-- qb-multicharacter line 6
local function GiveStarterItems(source)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
for _, v in pairs(QBCore.Shared.StarterItems) do
Player.Functions.AddItem(v.item, v.amount, false, info)
end
return exports['five-idcard']:CreateMetaLicense(source)
end
It will automatically give the identity card when the user has just registered. You'll also have to remove id_card from the StarterItems in your qb-core/shared/main.lua
config.
โจ Extra
If you want to give yourself the id card, you can add this command to the server.lua
of five-idcard:
QBCore.Commands.Add('givedocs', "Give yourself documents", {}, false, function(source)
exports["five-idcard"]:CreateMetaLicense(source)
end, 'admin')
โ Need support?
You still don't know how to proceed? We know this is not beginner-friendly, so we will give you free setup support on our Discord Server!
Last updated