Configuration
config.lua
Config = {}
-- Basic config
Config.Framework = "ESX" --ESX/QB
Config.Locale = "EN" -- Default: "EN" (locales.lua)
Config.OpenKey = "F10"
Config.LogoName =
"https://media.discordapp.net/attachments/1142137628842532956/1175928042212827308/logo.png?ex=656d0354&is=655a8e54&hm=27b3c3f3e586e7bef469d7f92c9d054d5e49e8aabf22f6c5db397ff058ce80d6&=" -- Drop your logo in the images folder.
Config.DiscordLogs = true -- webhooks in the webhooks.lua
Config.Groups = {
["user"] = { -- Group name
label = "User", -- Displayed label
isAdmin = false, -- Is Admin group
rankColor = "#99a1ad", -- Group color
},
["admin"] = { -- Group name
label = "Admin", -- Displayed label
isAdmin = true, -- Is Admin group
rankColor = "#ff0707c9", -- Group color
},
--------- [Example roles] -----------
-- ["mod"] = { -- Group name
-- label = "Mod", -- Displayed label
-- isAdmin = true, -- Is Admin group
-- rankColor = "#ff0707c9", -- Group color
-- },
-- ["god"] = { -- Group name
-- label = "God", -- Displayed label
-- isAdmin = true, -- Is Admin group
-- rankColor = "#ff0707c9", -- Group color
-- },
}
-- Premium shop
Config.testTime = 60 -- In seconds.
-- Categories
Config.Categories = {
car = "Vehicles",
items = "Items",
}
-- Permission
Config.AdminGroupsForPremium = { -- You can configure which admin groups can manage premium points...
["admin"] = true,
}
-- Commands
Config.AdminCommands = { -- Commands enable/disable
["setpp"] = true,
["givepp"] = true,
["removepp"] = true,
}
-- Enable/disable menu options
Config.Menus = {
["character"] = true,
["vehicles"] = true,
["players"] = true,
["premiumshop"] = true,
}
-- Enable/disable the character informations
Config.EnabledInformations = {
["Character Name"] = true,
["Birthday"] = true,
["Payment"] = true,
["Cash"] = true,
["Bank"] = true,
["PP"] = true,
["Players Count"] = true,
["Role"] = true,
}
-- Items
Config.PremiumItems = {
{
label = "Banshee",
modelName = "banshee",
image = "https://media.discordapp.net/attachments/1142137628842532956/1175927145118318692/banshee.png?ex=656d027f&is=655a8d7f&hm=929ae705d49ad6128b0d6760fa6f5b74dfb5f044fd8082975869e56724374fed&=&width=1260&height=597", -- Img link
vehicleTest = true,
price = 5000,
category = "car",
-- customFunction = "test", -- By default, it's works with two categories: "car" and "item".
},
{
label = "Burger",
count = 5,
itemName = "burger",
image = "https://media.discordapp.net/attachments/1142137628842532956/1175927257995415603/burger.png?ex=656d0299&is=655a8d99&hm=89420116346d48ad1f8830aecb0005f42499ee6d58b7525919d3cd1e1b61e031&=", -- Img link
price = 1000, -- Price in PP
category = "items", -- Category name
-- customFunction = "test",
},
}
-- Add custom functions
Config.CustomFunctions = {
-- [Example]
test = function(xPlayer, data) -- By default, it's works with two categories: "car" and "item".
chatMessage("This is a test.", { 255, 255, 255 }, xPlayer.source)
end,
}
-- Chat messages
function chatMessage(message, color, target)
local msg = {
color = color or { 255, 255, 255 },
multiline = true,
args = { "Server", message },
}
if IsDuplicityVersion() then
TriggerClientEvent("chat:addMessage", target or -1, msg)
return
end
TriggerEvent("chat:addMessage", msg)
end
-- Functions
Config.ItemAddFunction = function(xPlayer, itemName, count)
if Config.Framework == "ESX" then
xPlayer.addInventoryItem(itemName, count)
else
xPlayer.Functions.AddItem(itemName, count)
end
end
Config.VehicleAddFunction = function(xPlayer, data, plate)
if Config.Framework == "ESX" then
MySQL.insert("INSERT INTO owned_vehicles SET owner = ?, plate = ?, vehicle = ?", {
xPlayer.identifier,
plate,
json.encode({ model = GetHashKey(tostring(data.modelName)), plate = plate }),
})
else
MySQL.insert(
"INSERT INTO player_vehicles (license, citizenid, vehicle, hash, mods, plate, garage, state) VALUES (?, ?, ?, ?, ?, ?, ?, ?)",
{
xPlayer.PlayerData.license,
xPlayer.PlayerData.citizenid,
data.modelName,
GetHashKey(data.modelName),
"{}",
plate,
"pillboxgarage",
0,
}
)
end
end
Last updated
Was this helpful?