Pickle Mods
  • Pickle Mods
  • Paid Resources
    • Casinos
      • Installation
      • Tutorial
    • In-Game Store
      • Installation
      • Exports
      • Tebex & Coin Products
      • PTS Commands
    • Rewards System
      • Installation
      • Exports
      • Snippets
    • Bail & Bounty
      • Installation
      • Exports
    • Firefighter Job
      • Installation
      • Commands
      • Exports
      • Snippets
    • Advanced Crafting
      • Installation
    • Electrician Job
      • Installation
    • Construction Job
      • Installation
    • Hunting
      • Installation
    • Documents
      • Installation
      • Exports & Examples
    • Dealership
      • Installation
    • Police Tools
      • Installation
  • Free Resources
    • Pickle Airport
      • Installation
      • Hotfixes
    • Pickle Consumables
      • Installation
      • Hotfixes
    • Pickle Farming
      • Installation
    • Pickle Metal Detector
      • Installation
    • Pickle Payments
      • Installation
    • Pickle Prisons
      • Installation
      • Commands
      • Exports
      • Events
      • Snippets
    • Pickle Rentals
      • Installation
    • Pickle Slapboxing
      • Installation
    • Pickle Taxi Job
      • Installation
    • Waypoints
      • Installation
      • Exports
Powered by GitBook
On this page
  1. Paid Resources
  2. Documents

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)

PreviousInstallationNextDealership

Last updated 1 year ago