Configuration
Don't touch this line
Config, Lang, Noti = {}, {}, {}
CONFIGURATION FILE
Config, Lang, Noti = {}, {}, {}
-- $$$$$$\ $$$$$$$$\ $$\ $$\ $$$$$$$$\ $$$$$$$\ $$$$$$\ $$\
--$$ __$$\ $$ _____|$$$\ $$ |$$ _____|$$ __$$\ $$ __$$\ $$ |
--$$ / \__|$$ | $$$$\ $$ |$$ | $$ | $$ |$$ / $$ |$$ |
--$$ |$$$$\ $$$$$\ $$ $$\$$ |$$$$$\ $$$$$$$ |$$$$$$$$ |$$ |
--$$ |\_$$ |$$ __| $$ \$$$$ |$$ __| $$ __$$< $$ __$$ |$$ |
--$$ | $$ |$$ | $$ |\$$$ |$$ | $$ | $$ |$$ | $$ |$$ |
--\$$$$$$ |$$$$$$$$\ $$ | \$$ |$$$$$$$$\ $$ | $$ |$$ | $$ |$$$$$$$$\
--\______/ \________|\__| \__|\________|\__| \__|\__| \__|\________|
--Use "esx" or "qb"
Config.Framework = "qb"
--If you are using one of the most recent versions of ESX, set the script name. Default = "es_extended"
Config.ESXExport = ""
--Default ESX: "esx:getSharedObject" | Default QB: "qb-core"
Config.Core = "qb-core"
--oxmysql, mysql-async or ghmattisql
Config.Mysql = "oxmysql"
--Font to use in alert "Press E to access the business"
Config.alertTextFont = 4
--Color for the 3D text
Config.text3Dcolor = "~q~"
--Change to your currency
Config.currency = "$"
--Time it takes from the time the user accesses the server until the payment is received
Config.PaycheckTimer = 60
--Account to be used for most payments
Config.useAccount = "bank"
--Command to open te admin menu
Config.adminCommand = "adminbus"
--Configure your Discord Webhook to get logs
Config.Discord = ""
--Percentage earned by workers. 0.2 = 20%
Config.workersPercentage = 0.2
--$$\ $$\ $$$$$$\ $$$$$$$$\ $$$$$$\ $$$$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$$$\ $$$$$$\ $$$$$$\ $$\ $$\ $$$$$$\
--$$$\ $$ |$$ __$$\\__$$ __|\_$$ _|$$ _____|\_$$ _|$$ __$$\ $$ __$$\\__$$ __|\_$$ _|$$ __$$\ $$$\ $$ |$$ __$$\
--$$$$\ $$ |$$ / $$ | $$ | $$ | $$ | $$ | $$ / \__|$$ / $$ | $$ | $$ | $$ / $$ |$$$$\ $$ |$$ / \__|
--$$ $$\$$ |$$ | $$ | $$ | $$ | $$$$$\ $$ | $$ | $$$$$$$$ | $$ | $$ | $$ | $$ |$$ $$\$$ |\$$$$$$\
--$$ \$$$$ |$$ | $$ | $$ | $$ | $$ __| $$ | $$ | $$ __$$ | $$ | $$ | $$ | $$ |$$ \$$$$ | \____$$\
--$$ |\$$$ |$$ | $$ | $$ | $$ | $$ | $$ | $$ | $$\ $$ | $$ | $$ | $$ | $$ | $$ |$$ |\$$$ |$$\ $$ |
--$$ | \$$ | $$$$$$ | $$ | $$$$$$\ $$ | $$$$$$\ \$$$$$$ |$$ | $$ | $$ | $$$$$$\ $$$$$$ |$$ | \$$ |\$$$$$$ |
--\__| \__| \______/ \__| \______|\__| \______| \______/ \__| \__| \__| \______| \______/ \__| \__| \______/
function notifications(notitype, message, time)
--Change this trigger for your notification system keeping the variables
TriggerEvent('codem-notification', message, time, notitype)
end
--Notifications types:
Noti.info = 'info'
Noti.check = 'check'
Noti.error = 'error'
--Notification time:
Noti.time = 5000
--$$\ $$\ $$$$$$\ $$$$$$$\ $$\ $$\ $$$$$$$$\ $$$$$$$\
--$$$\ $$$ |$$ __$$\ $$ __$$\ $$ | $$ |$$ _____|$$ __$$\
--$$$$\ $$$$ |$$ / $$ |$$ | $$ |$$ |$$ / $$ | $$ | $$ |
--$$\$$\$$ $$ |$$$$$$$$ |$$$$$$$ |$$$$$ / $$$$$\ $$$$$$$ |
--$$ \$$$ $$ |$$ __$$ |$$ __$$< $$ $$< $$ __| $$ __$$<
--$$ |\$ /$$ |$$ | $$ |$$ | $$ |$$ |\$$\ $$ | $$ | $$ |
--$$ | \_/ $$ |$$ | $$ |$$ | $$ |$$ | \$$\ $$$$$$$$\ $$ | $$ |
--\__| \__|\__| \__|\__| \__|\__| \__|\________|\__| \__|
Marker = {
mtype = 23,
--RGB COLOR:
r = 245,
g = 14,
b = 70
}
--$$$$$$$\ $$\ $$$$$$\ $$$$$$$\ $$$$$$\
--$$ __$$\ $$ | \_$$ _|$$ __$$\ $$ __$$\
--$$ | $$ |$$ | $$ | $$ | $$ |$$ / \__|
--$$$$$$$\ |$$ | $$ | $$$$$$$ |\$$$$$$\
--$$ __$$\ $$ | $$ | $$ ____/ \____$$\
--$$ | $$ |$$ | $$ | $$ | $$\ $$ |
--$$$$$$$ |$$$$$$$$\ $$$$$$\ $$ | \$$$$$$ |
--\_______/ \________|\______|\__| \______/
Blips = {}
Blips.blip = 369
Blips.blipColor = 2
Blips.blipScale = 0.9
Blips.blipText = "Business"
--$$\ $$$$$$\ $$\ $$\ $$$$$$\ $$\ $$\ $$$$$$\ $$$$$$\ $$$$$$$$\
--$$ | $$ __$$\ $$$\ $$ |$$ __$$\ $$ | $$ |$$ __$$\ $$ __$$\ $$ _____|
--$$ | $$ / $$ |$$$$\ $$ |$$ / \__|$$ | $$ |$$ / $$ |$$ / \__|$$ |
--$$ | $$$$$$$$ |$$ $$\$$ |$$ |$$$$\ $$ | $$ |$$$$$$$$ |$$ |$$$$\ $$$$$\
--$$ | $$ __$$ |$$ \$$$$ |$$ |\_$$ |$$ | $$ |$$ __$$ |$$ |\_$$ |$$ __|
--$$ | $$ | $$ |$$ |\$$$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |
--$$$$$$$$\ $$ | $$ |$$ | \$$ |\$$$$$$ |\$$$$$$ |$$ | $$ |\$$$$$$ |$$$$$$$$\
--\________|\__| \__|\__| \__| \______/ \______/ \__| \__| \______/ \________|
Lang.createdbusiness = "The business has been created correctly"
Lang.errorcreatebusiness = "Business could not be created"
Lang.errorcreatebname = "There is already a business with the same name"
Lang.ownerChanged = "The owner of the business has been changed correctly"
Lang.noOwnerChanged = "It has not been possible to change the owner of the business. Maybe it is offline?"
Lang.deletedStock = "The entire stock of the business has been deleted"
Lang.noDeletedStock = "Failure to remove stock from the business"
Lang.deletedBusiness = "The business has been successfully deleted"
Lang.noDeletedBusiness = "Business has not been eliminated"
Lang.wipedBusiness = "All businesses have been wiped"
Lang.noWipedBusiness = "Unable to perform a wipe of the businesses"
Lang.pressE = "Press ~q~E~s~ to access the business"
Lang.price = "~w~Price: ~g~"
Lang.stockupdated = "The stock has been updated correctly"
Lang.stocknotupdated = "Stock could not be updated"
Lang.nomoney = "You don't have enough money"
Lang.targetError = "It has not been possible to recover the data of the player with id:"
Lang.addedWorker = "The worker has been successfully added to the business"
Lang.notAddedWorker = "The worker could not be added to the business"
Lang.soldBusiness = "The business has been successfully sold"
Lang.notSoldBusiness = "The business could not be sold"
Lang.businessAcquired = "The business has been acquired correctly"
Lang.businessNotAcquired = "The business could not be acquired"
Lang.paycheckReceived = "You have received a payment for your business"
--$$$$$$$$\ $$\ $$\ $$\ $$\ $$$$$$\ $$$$$$$$\ $$$$$$\ $$$$$$\ $$\ $$\ $$$$$$\
--$$ _____|$$ | $$ |$$$\ $$ |$$ __$$\\__$$ __|\_$$ _|$$ __$$\ $$$\ $$ |$$ __$$\
--$$ | $$ | $$ |$$$$\ $$ |$$ / \__| $$ | $$ | $$ / $$ |$$$$\ $$ |$$ / \__|
--$$$$$\ $$ | $$ |$$ $$\$$ |$$ | $$ | $$ | $$ | $$ |$$ $$\$$ |\$$$$$$\
--$$ __| $$ | $$ |$$ \$$$$ |$$ | $$ | $$ | $$ | $$ |$$ \$$$$ | \____$$\
--$$ | $$ | $$ |$$ |\$$$ |$$ | $$\ $$ | $$ | $$ | $$ |$$ |\$$$ |$$\ $$ |
--$$ | \$$$$$$ |$$ | \$$ |\$$$$$$ | $$ | $$$$$$\ $$$$$$ |$$ | \$$ |\$$$$$$ |
--\__| \______/ \__| \__| \______/ \__| \______| \______/ \__| \__| \______/
-- ___ ____ ______ ___ ___ ___ __ __ ____ _ _
-- // \\ || | || | ||\\//|| // \\ ||\ || || \\//
-- (( ___ ||== || || \/ || (( )) ||\\|| ||== )/
-- \\_|| ||___ || || || \\_// || \|| ||___ //
function getUserMoney(xPlayer)
if Config.Framework == "esx" then
local money = xPlayer.getAccount(Config.useAccount).money
return money
elseif Config.Framework == "qb" then
local money = xPlayer.PlayerData.money[Config.useAccount]
return money
end
end
-- ___ ____ ____ ___ ___ ___ __ __ ____ _ _
-- // \\ || \\ || \\ ||\\//|| // \\ ||\ || || \\//
-- ||=|| || )) || )) || \/ || (( )) ||\\|| ||== )/
-- || || ||_// ||_// || || \\_// || \|| ||___ //
function addUserMoney(xPlayer, amount)
if Config.Framework == "esx" then
xPlayer.addMoney(amount)
elseif Config.Framework == "qb" then
xPlayer.Functions.AddMoney(Config.useAccount, amount, "Business")
end
end
-- ____ ____ ___ ___ ___ __ __ ____ ___ ___ ___ __ __ ____ _ _
-- || \\ || ||\\//|| // \\ || || || ||\\//|| // \\ ||\ || || \\//
-- ||_// ||== || \/ || (( )) \\ // ||== || \/ || (( )) ||\\|| ||== )/
-- || \\ ||___ || || \\_// \V/ ||___ || || \\_// || \|| ||___ //
function removeUserMoney(xPlayer, amount)
if Config.Framework == "esx" then
xPlayer.removeAccountMoney(Config.useAccount, amount)
elseif Config.Framework == "qb" then
xPlayer.Functions.RemoveMoney(Config.useAccount, amount, "Business")
end
end
Last updated