Documentation
  • Discord Server
  • About Us
  • Free Resources
    • Death Screen
      • PS-Dispatch Integration
    • Battlepass
      • Guides
      • Commands
        • Player Commands
        • Admin Commands
      • API
        • Server
    • Garages
      • Guides
        • Creating Interior
        • Creating Garage
        • How to find entity sets (customizations) for interior
  • Paid Resources
    • Elevator Creator V2
      • Installation
      • Accessible code
    • Radar System V2
      • Installation
      • Accessible code
    • Hotels Creator
      • Accessible code
    • Vehicle Shop Creator
      • Accessible code
    • Stocks Market
      • Accessible code
      • [DEV] - Usable Functions
    • Discord Voice Attendance
      • Installation
    • Deathmatch System
      • Installation
        • esx_ambulancejob
        • qb-ambulancejob
        • wasabi_ambulance
        • qbx_medical
        • codem-inventory
        • core_inventory
      • Accessible code
    • Object Creator
      • Dependencies
      • Accessible code
    • Cocaine Labs
      • Dependencies
      • Accessible code
    • Ownable Crafting Tables
      • Dependencies
      • Accessible code
      • Common Problems
    • Evidence System
      • Dependencies
      • Accessible code
      • Installation
      • API
    • Marketplace V2
      • Accessible code
      • Installation
      • Migration from V1
    • EMS Dispatch
      • Sending Dispatch
      • Accessing the Menu
      • Config File
    • Weed Planting
      • Accessible code
      • How to add new strain?
      • How to install
    • Advanced DarkNet System
      • Config
    • Advanced Taxi Job
      • Accessible code
      • Changelog
    • Advanced Gang Creator
      • Accessible code
      • Installation
        • QB Core
        • QBOX Core
      • API
      • FAQ
    • Advanced Private Cameras
      • ESX
        • Items
      • QBCore
        • Items
      • Accessible code
    • Advanced Elevator Creator
      • Accessible code
    • Advanced Ownable Rent Creator
      • SQL
      • ESX
      • QBCore
      • Config File
    • Advanced Job Creator
      • Installation
        • QB CORE
      • Accessible code
    • Advanced Ownable Shops
      • Installation
      • Accessible code
      • SQL
    • Advanced Ped Creator
      • SQL
      • Config File
    • Advanced Promocode Creator
      • Accessible code
      • SQL File
      • Common problems
    • Advanced Safe Zone Creator
      • Config File
    • Turf Wars
      • Ox Inventory
      • Accessible code
      • API
    • Advanced Gas Station Creator
      • Accessible code
    • Advanced Advertisements System
      • SQL File
      • Accessible code
    • Player Manager
      • Installation
      • Accessible code
    • Mechanic Job
      • Installation
      • Accessible code
      • SQL
    • Advanced Radar System
      • Accessible code
      • SQL
    • Crypto Mining
      • Installation
      • Accessible code
      • Items
      • SQL
    • Racing System
      • Accessible code
    • Car Theft
      • Accessible code
    • Advanced Solar Panels
      • Accessible Code
      • SQL
      • ESX
        • Items
      • QBCore
        • Items
    • Pilot Job
      • Accessible Code
      • ESX
        • SQL
      • QBCore
        • Metadata
        • qb-smallresources
      • QBOX
        • Metadata
    • Advanced Ownable Banks
      • Accessible Code
    • Post Office
      • Accessible Code
      • ESX
        • SQL
      • QBCore
        • SQL
      • Exports
    • Weather Sync
      • API
    • Billing System
      • Accessible code
      • SQL
      • Common problems
Powered by GitBook
On this page
  1. Paid Resources
  2. Ownable Crafting Tables

Accessible code

Config = {
    locales = 'en',
    versionChecking = true,

    tableProp = 'gr_prop_gr_bench_04b',
    tableitem = 'crafting_table',
    
    textUIAlign = 'left-center',
    menuUIAlign = 'top-right',

    useTarget = true,
    targetType = 'qb', -- ox, qb

    spawnPropDistance = 25.0,
    interactionDistance = 1.5,
    targetDistance = 2.5,
    
    spawnAnyWhere = false,
    groundHashes = {
        -1286696947,
        1144315879,
        1333033863,
        -1942898710,
        -1885547121,
        223086562,
        -461750719,
    },

    idString = 'table-xxxxx-xxxxx',

    maxTablePerPlayer = 2,

    toggleBlip = {
        enable = true,
        command = 'tableblip',
        blipSettings = {
            id = 478,
            color = 2,
            scale = 0.8,
            display = 4,
        }
    },

    commands = {
        [1] = {
            enable = true,
            command = 'tptotable',
            permission = 'user.admin',
            help = 'Teleport to crafting table',
            params = {
                {
                    name = 'tableId',
                    type = 'string',
                    help = 'Enter table id'
                }
            }
        },
        [2] = {
            enable = true,
            command = 'tables',
            permission = 'user.admin',
            help = 'Edit crafting tables',
        },
    },

    levels = {
        [0] = {
            label = 'Beginner',
        },
        [1] = {
            label = 'Crafter',
            xpRequire = 150,
        },
        [2] = {
            label = 'Advanced Crafter',
            xpRequire = 350,
        },
        [3] = {
            label = 'Expert Crafter',
            xpRequire = 500,
        },
    },

    defaultRecipes = {
        {
            label = 'Radio',
            item = 'radio',
            amount = 1,
            levelreq = 0,
            xp = 20,
            craftTime = 1, -- in seconds
            imgpath = 'https://cfx-nui-qb-inventory/html/images/radio.png',
            recipe = {
                {item = "iron", label = "Iron", amount = 1},
            }
        },
    },

    blueprintsRecipes = {
        lockpick = {
            label = 'Lockpick',
            item = 'lockpick',
            amount = 1,
            levelreq = 0,
            xp = 50,
            craftTime = 5, -- in seconds
            imgpath = 'https://cfx-nui-qb-inventory/html/images/lockpick.png',
            recipe = {
                {item = "iron", label = "Iron", amount = 1},
            }
        }
    },
}
function progressBar(duration, label, animDict, animClip)
    if lib.progressBar({
        duration = duration,
        label = label,
        useWhileDead = false,
        canCancel = true,
        disable = {
            car = true,
            move = true,
            combat = true,
        },
        anim = {
            dict = animDict,
            clip = animClip
        },
    }) then 
        return true
    else
        return false
    end
end

Notification = function (title, description, type)
    -- types are success and error
    lib.notify({
        title = title,
        description = description,
        type = type
    })
end
-- BLUE PRINT ITEMS USABLE
CreateUsableItem('lockpick_blueprint', function(source, item)
	local Player = GetPlayerBySource(source)
    if not Player then return end

    UseBluePrint(Player, 'lockpick', 'lockpick_blueprint')
end)

--exports['uniq-craftingtables']:UseBluePrint(player, blueprintName, itemName)

Notification = function (source, title, description, type)
    -- types are success and error
    TriggerClientEvent('ox_lib:notify', source, {
        title = title,
        description = description,
        type = type
    })
end
PreviousDependenciesNextCommon Problems

Last updated 1 year ago