5๏ธโƒฃ
Five Developments
  • ๐Ÿ‘‹Welcome!
  • SCRIPTS
    • ๐Ÿง‘โ€๐Ÿฆฑfive-idcard
      • ๐Ÿ“Setup
      • โ›๏ธExports & Events
    • โœ‰๏ธfive-textui
      • ๐Ÿ“Setup
      • โ›๏ธExports
    • ๐Ÿ‘ฎfive-dispatch
      • ๐Ÿ“Setup
      • โ›๏ธServer Events
    • ๐Ÿš—five-repairkit
      • ๐Ÿ“Setup
      • โ›๏ธExports
    • ๐Ÿ’ฐfive-billing
      • ๐Ÿ“Setup
      • โ›๏ธExports & Event
Powered by GitBook
On this page
  • ๐Ÿงจ ESX
  • ๐Ÿงง QBCore
  • โœจ Extra
  • โ“ Need support?
  1. SCRIPTS
  2. five-idcard

Setup

Previousfive-idcardNextExports & Events

Last updated 1 year ago

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 's !

๐Ÿงจ 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 !

๐Ÿง‘โ€๐Ÿฆฑ
๐Ÿ“
alp1x
bridge
Discord Server