Exports & Examples

This is the list of exports and examples for this resource.

Server

exports.pickle_documents:GiveDocument(source, name, metadata, cb)

RegisterNetEvent('qb-cityhall:server:requestId', function(item, hall)
    local src = source
    local Player = QBCore.Functions.GetPlayer(src)
    if not Player then return end
    local itemInfo = Config.Cityhalls[hall].licenses[item]
    if not Player.Functions.RemoveMoney("cash", itemInfo.cost) then return TriggerClientEvent('QBCore:Notify', src, ('You don\'t have enough money on you, you need %s cash'):format(itemInfo.cost), 'error') end
    local info = {}
    if itemInfo then
        exports.pickle_documents:GiveDocument(src, "Drivers", {
            address = "123 Park Rd",
            location = "Los Santos",
            height = "6'1",
            gender= "M",
            eyes = "BROWN",
        }, { takePhoto = true })
    else
        return
    end
    TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items[item], 'add')
end)

Last updated