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. Advanced Ownable Shops

Accessible code

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

    useInventory = false, -- if you want to use inventory for shops
    inventoryType = 'ox', -- ox, qs, qb, core, lj, ps
    imgPatch = '',
    -- ox inv 'nui://ox_inventory/web/images/%s.png'
    -- qb inv 'nui://qb-inventory/html/images/%s.png'
    -- qs inv 'nui://qs-inventory/html/images/%s.png'
    -- core inv 'nui://core_inventory/html/img/%s.png'

    useTarget = false,
    targetType = 'ox', -- ox, qb
    targetDistance = 2.5,
    targetImages = {
        ped = 'fa-solid fa-cart-shopping',
        safe = 'fa-solid fa-lock',
        menu = 'fa-solid fa-briefcase',
    },


    RobberyMiniGame = { -- you can add your custom minigame in utils/client/main.lua
        UseCircle = true,
        UsePureMinigame = false, -- https://github.com/purescripts-fivem/pure-minigames
        UseLockpick = false, -- https://github.com/baguscodestudio/lockpick
    },

    menuAlign = 'top-right', -- https://overextended.dev/ox_lib/Modules/Interface/Client/menu
    textUIAlign = 'right-center', -- https://overextended.dev/ox_lib/Modules/Interface/Client/textui

    maxShopPerPlayer = 1, -- max stores per player

    drawMarkerDistance = 10.0,
    interactionDistance = 2.0,

    nameChangePrice = 5000,

    whitelistedJobs = { 
        'police'
    },

    robAmount = { -- reward
        min = 1000,
        max = 5000
    },
    robProgressTime = 5000,
    robAnim = {
        dict = 'anim@amb@clubhouse@tutorial@bkr_tut_ig3@',
        anim = 'machinic_loop_mechandplayer'
    },

    currencyType = { -- only works with menu
        --['money'] = 'Cash', -- for esx
        ['cash'] = 'Cash', -- for qbcore
        ['bank'] = 'Bank'
    },

    controls = { -- https://docs.fivem.net/docs/game-references/controls/
        rotateRight = 307,
        rotateLeft = 308,
        finish = 201,
        cancel = 194,
        interact = 38,
    },

    commands = {
        {
            name = 'shops',
            permission = 'group.admin',
            help = 'Shops Menu (create shop, shop list, delete shop, refresh data ...)'
        },
        {
            name = 'deleteshop',
            permission = 'group.admin',
            help = 'Delete shop'
        }
    },
}
Logs = {
    enable = false,
    botName = 'UNIQ TEAM',
    webhook = '',
    steamName = true,
    colors = {
        ['info'] = 1209030,
        ['success'] = 5024796,
        ['error'] = 12980754,
    }
}
Utils = {}

Utils.Notification = function(title, description, type, duration)
    lib.notify({
        title = title,
        description = description,
        type = type,
        duration = duration or 5000
    })
end

Utils.RobFunctions = function()
    if Config.RobberyMiniGame.UseCircle then
        local result = lib.skillCheck({'easy', 'easy', {areaSize = 60, speedMultiplier = 2}, 'hard'}, {'w', 'a', 's', 'd'})
        return result
    elseif Config.RobberyMiniGame.UsePureMinigame then
        local gameData = {
            totalNumbers = 10,
            seconds = 15,
            timesToChangeNumbers = 5,
            amountOfGames = 1,
            incrementByAmount = 5,
        }
        local result = exports['pure-minigames']:numberCounter(gameData)
        return result
    elseif Config.RobberyMiniGame.UseMhacking then
        function HackCallback(result, timeremaining)
            TriggerEvent("mhacking:hide")
            return result
        end

        TriggerEvent("mhacking:show")
        TriggerEvent("mhacking:start", 7, 150, HackCallback)
    elseif Config.RobberyMiniGame.UseLockpick then
        local result = exports['lockpick']:startLockpick()
        return result
    end
end

RegisterNetEvent('uniq-ownableshops:client:SendDispatchReport', function(coords)
    TriggerServerEvent('dispatch:svNotify', {
        dispatchCode = "10-90",
        priority = 2,
        origin = {x = coords.x, y = coords.y, z = coords.z},
        dispatchMessage = "Store Robbery"
    })
    TriggerServerEvent('qb-dispatch:storerobbery', coords)
end)utils/client/main.luautils/client/main.lua
Utils = {}

Utils.Notification = function(src, title, description, type, duration)
    TriggerClientEvent('ox_lib:notify', src, {
        title = title,
        description = description,
        type = type,
        duration = duration
    })
end
PreviousInstallationNextSQL

Last updated 10 months ago