You have some events to customize the script as you want and make it fully compatible with how your server works.
-- By default is uses Loops with 3D text
-- but if you want to replace it with Polyzones you can use the event:
-- It can be triggered client/server side and needs to receive an argument with the name
-- of the tuning shop:
-- If you don't send the tuner shop as argument or it doesn't exist in Config
-- the script will print the next error:
"zone is not defined!".
-- The next event is triggered when you enter/exit from tuner menu
-- and it will send a boolean as argument.
if status then
-- Hide your HUD where inside tuner menu
-- Show your HUD, tuner menu is already closed.
-- Society isn't preconfigured in the script because there's a lot of different
-- society scripts out there and is complicated to make a config for each one...
-- Go to server/framework/money.lua > function TicketPayment(worker,total)
-- This function receives 2 parameters, the worker source and
-- the ticket total.
-- There's also a local variable called comission which is the comission
-- the worker will receive for installing the mods
-- To send all this to your society script we need to get the worker job
-- After we get the job we are gonna trigger your society event and send job and total
-- as arguments, from there it depends how your society works and how much money you
-- wanna add to society, feel free to make all the modifications you need to achieve this.
function TicketPayment(worker, total)
local src = worker
local comission = tonumber(total) * Config.MechanicComission / 100
if Config.Framework == "QBCore" then
local Player = QBCore.Functions.GetPlayer(src)
if Player then
local job = Player.PlayerData.job.name
elseif Config.Framework == "ESX" then
local xPlayer = ESX.GetPlayerFromId(src)
if xPlayer then
local job = xPlayer.job.name