Config File

This is the default config file

-- If you need support I now have a discord available, it helps me keep track of issues and give better support.

-- https://discord.com/invite/Gh4VpmAssN

-- CONTROLS
-- +/- Width: Hold SHIFT + Scroll Up/Down
-- +/- Length: Hold CAPSLOCK + Scroll Up/Down
-- Rotate: Scroll Up/Down
-- Slowdown Rate: Press and Hold CTRL
-- Switch to z-axis: Z
-- Cancel: ESC/ Backspace
-- Confirm: Enter

Config = {}
Config.Debug = false -- Set to true to enable debug messages

Config.Framework = "qb-core" -- Name of your qb-core framework folder, if renamed
Config.Notify = "qb" -- Add as many as you want below
Config.Inv = "qb" -- qb or ox (Inventory)
Config.Menu = "ox" -- qb or ox (Menu)
Config.Lang = "en" -- Language file, you can edit or create your own one.
-- STILL Requires Ox_lib!!!

Config.PlayerDistance = 25.0 -- Distance to show players on list when creating stash (Optional)

-- Target Settings:
Config.Target = {
	-- "none" (Recommended) Just enter the zone you created, then the showUI will pop up on users screen and press E to interact
    -- "ox_target" (Requires Ox Target) All objects within your box zone will be targetable
    -- "qb-target" (Requires Qb Target, if you have renamed qb-target, write the renamed folder name, e.g. "nc-target") All objects within your box zone will be targetable
	name = "none",
	distance = 2.5,
	icon = "fa-solid fa-box",
	TargetLabel = function(stashName, sharedStash) -- This function is called to display label when targetting the area
		-- stashName: The stash name you have assigned to it, you may use if needed.
		-- sharedStash: True=Shared, False=Personal. You may use if you want.
        return "Open Stash"
	end
}


-- Discord Settings:
Config.Discord = { 
    Webhook = { -- Add your discord webooks here...
        Create = "CHANGE_WEBHOOK", -- When a stash is created by ...
        Delete = "CHANGE_WEBHOOK", -- When gov delete stash through viewstashoptions menu
        Edit = "CHANGE_WEBHOOK", -- When gov edit stash through viewstashoptions menu
        Open = "CHANGE_WEBHOOK" -- When gov opens stash through viewstashoptions menu
    },
    Profile = {image = "https://dunb17ur4ymx4.cloudfront.net/webstore/logos/6b819a03fdcbd3af0117c61770071be9da8e0722.png", name = "NS Stash Menu"},
    Color = {Create = 5763719, Edit = 16705372, Open = 3447003, Delete = 15548997} -- COLOR OF EMBEDS
}

-- Stash Verification Upon Creating:
Config.CreatingStashVerification = {
    weight = { min=1000, max=4000000 }, -- Stash Size (1000 converts to 1.000)
    slots = {min = 3, max = 100}, -- Stash Slots
	nameLength = {min = 4, max = 16}, -- Stash Name
}

-- Commands Names and Permissions:
Config.Commands = {
	createstash = {name = "createstash", permission = "admin"},
	viewstashoptions = {name = "viewstashes", permission = "admin"}
}

-- Option upon creating stash to allow police to open certain stashes. Put all police jobs here:
Config.PoliceJobs = {"police"}

Config.triggerNotify = function(message, type, src) -- function called upon notifying user
    if Config.Notify == "okok" then
		if not src then	exports['okokNotify']:Alert(title, message, 6000, type)
		else TriggerClientEvent('okokNotify:Alert', src, title, message, 6000, type) end
	elseif Config.Notify == "qb" then
		if not src then	TriggerEvent("QBCore:Notify", message, type)
		else TriggerClientEvent("QBCore:Notify", src, message, type) end
	elseif Config.Notify == "t" then
		if not src then exports['t-notify']:Custom({title = title, style = type, message = message, sound = true})
		else TriggerClientEvent('t-notify:client:Custom', src, { style = type, duration = 6000, title = title, message = message, sound = true, custom = true}) end
	elseif Config.Notify == "infinity" then
		if not src then TriggerEvent('infinity-notify:sendNotify', message, type)
		else TriggerClientEvent('infinity-notify:sendNotify', src, message, type) end
	elseif Config.Notify == "rr" then
		if not src then exports.rr_uilib:Notify({msg = message, type = type, style = "dark", duration = 6000, position = "top-right", })
		else TriggerClientEvent("rr_uilib:Notify", src, {msg = message, type = type, style = "dark", duration = 6000, position = "top-right", }) end
	end
end


Config.ShowUI = function(stashName, sharedStash) -- This function is called to display to open the stash in its zone
    -- stashName: The stash name you have assigned to it, you may use if needed.
    -- sharedStash: True=Shared, False=Personal. You may use if you want.
    exports['qb-core']:DrawText("<b>[E] Open Stash</b>", 'left')
end

Config.HideUI = function() -- This function is called to hide to open the stash, when out of its zone
    exports['qb-core']:HideText()
end

Last updated