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
Last updated