Config

axeVip config file example

Config File

Config = {}

Config.AdminPermissions = { "admin", "god" }

Config.Framework = "qbox" -- "qb" or "esx" or "qbox"

Config.Inventory = "ox" -- "ox"

Config.Target = "ox" -- "ox"

Config.Commands = {
	["CREATE_VIP"] = "createvip",
	["REDEEM_VIP"] = "redeem",
	["REMOVE_VIP"] = "removevip",
	["DOORBELL"] = "doorbell",
}

Config.RingDoorbellTimeout = 30 -- Amount of seconds that player can ring doorbell after ringing the doorbell

Config.VipCurrency = "coins"

Config.VipSalary = {
	enabled = true, -- If you want vip salary feature enabled or not
	paymentInterval = 30, -- Payment interval in minutes
}

Config.Packages = {
	-- ["example-no-perks"] = {
	-- 	redeemRewards = {
	-- 		{ type = "item", name = "burger", count = 5 },
	-- 		{ type = "currency", currencyType = "bank", amount = 500 },
	-- 		{ type = "currency", currencyType = "coins", amount = 50 },
	-- 		{ type = "penthouse", penthouseType = "penthouse_example" },
	-- 	},
	-- },

	-- ["example-no-inventory-perk"] = {
	-- 	redeemRewards = {
	-- 		{ type = "item", name = "burger", count = 5 },
	-- 		{ type = "currency", currencyType = "bank", amount = 500 },
	-- 		{ type = "currency", currencyType = "coins", amount = 50 },
	-- 		{ type = "penthouse", penthouseType = "penthouse_example" },
	-- 	},
	-- 	perks = { -- you can remove any of these perks
	-- 		salaryVipAmount = 10000,
	-- 	},
	-- },

	-- ["example-no-salary-perk"] = {
	-- 	redeemRewards = {
	-- 		{ type = "item", name = "burger", count = 5 },
	-- 		{ type = "currency", currencyType = "bank", amount = 500 },
	-- 		{ type = "currency", currencyType = "coins", amount = 50 },
	-- 		{ type = "penthouse", penthouseType = "penthouse_example" },
	-- 	},
	-- 	perks = { -- you can remove any of these perks
	-- 		inventory = {
	-- 			slots = 50,
	-- 			weight = 100000,
	-- 		},
	-- 	},
	-- },
	["example"] = {
		redeemRewards = {
			{ type = "item", name = "burger", count = 5 },
			{ type = "currency", currencyType = "bank", amount = 500 },
			{ type = "currency", currencyType = "coins", amount = 50 },
			{ type = "penthouse", penthouseType = "penthouse_example" },
		},
		perks = { -- you can remove any of these perks
			inventory = {
				slots = 50,
				weight = 100000,
			},
			salaryVipAmount = 10000,
		},
	},
}

Config.Penthouses = {
	["penthouse_example"] = {
		locations = {
			{
				type = "wardbrode",
				label = "Open Wardrobe",
				coords = vec3(-280.09, -722.42, 125.46),
			},
			{
				type = "entrance",
				label = "Enter in penthouse",
				coords = vec3(-304.97, -721.18, 28.03),
				coordsToTeleport = vec3(-287.97, -722.69, 125.47),
				changeBucket = true, -- When entering in penthouse if this is true will change player routing bucket.
			},
			{
				type = "exit",
				label = "Leave penthouse",
				coords = vec3(-287.97, -722.69, 125.47),
				coordsToTeleport = vec3(-304.97, -721.18, 28.03),
			},
			{
				type = "stash",
				label = "Open Stash",
				stashLabel = "Penthouse Example Stash",
				coords = vec3(-275.3, -724.33, 125.49),
				weight = 50000,
				slots = 50,
			},
		},
	},
}

Config.DoorBell = {
	{
		label = "Ring the doorbell",
		coords = vec3(-267.73, -760.35, 32.53),
		coordsToTeleport = vec3(-263.78, -764.52, 32.56),
		changeBucket = true, -- When entering in penthouse if this is true will change player routing bucket.
		penthouseType = "penthouse_example",
		playerMaxDistanceToBeTeleported = 30, -- If distance from player that request to enter in penthouse to the doorbell is higher he will not be teleported
	},
}

---@param title string
---@param description string
---@param type? 'error'|'info'|'success'|'warning'
---@param duration? integer
function Notify(title, description, type, duration)
	duration = duration or 5000

	lib.notify({
		title = title,
		description = description,
		type = type,
		duration = duration,
	})
end

--  ____   ___  _   _ _____   _____ ___  _   _  ____ _   _
-- |  _ \ / _ \| \ | |_   _| |_   _/ _ \| | | |/ ___| | | |
-- | | | | | | |  \| | | |     | || | | | | | | |   | |_| |
-- | |_| | |_| | |\  | | |     | || |_| | |_| | |___|  _  |
-- |____/ \___/|_| \_|_|_|_    |_| \___/ \___/ \____|_| |_|
-- | __ )| ____| |   / _ \ \      / /
-- |  _ \|  _| | |  | | | \ \ /\ / /
-- | |_) | |___| |__| |_| |\ V  V /
-- |____/|_____|_____\___/  \_/\_/

function GetTranslation(translationKey)
	return Locale[translationKey:upper()] or translationKey:upper()
end

Last updated