βοΈFrequently Asked Questions
1 - How to Make Bet Profits Go to Your Company ?
under server/bridge/qb/main.lua :
Find this function:
function AddMoney(src, amount, reason)
local Player = GetPlayer(src)
if reason == 'sports-wallet-withdrawal' then
amount = math.floor(amount * (1 - Config.Betting.cashoutFee))
Player.Functions.AddMoney('cash', amount, reason)
else
Player.Functions.AddMoney('cash', amount, reason)
end
-- REMOVE these money from the company example Casino account
-- UpdateJobFunds('casino', amount, 'withdraw', 'Bet cash addition')
endWhat to change:
Uncomment this line
UpdateJobFunds('casino', amount, 'withdraw', 'Bet cash addition')Change 'casino' to your company/job name
Example:
UpdateJobFunds('bahamas', amount, 'withdraw', 'Bet payout')
Find this function:
function RemoveMoney(src, amount, reason)
local Player = GetPlayer(src)
Player.Functions.RemoveMoney('cash', amount, reason)
-- ADD these money to the company example Casino account
-- UpdateJobFunds('casino', amount, 'deposit', 'Bet cash removal')
endWhat to change:
Uncomment this line
UpdateJobFunds('casino', amount, 'deposit', 'Bet cash removal')Change 'casino' to your company/job name (must match the one in AddMoney)
Example:
UpdateJobFunds('bahamas', amount, 'deposit', 'Bet placed')
2- How to Add a new Team or a new League ?
2-1- Add the new league or the new team to the config
2-2- While the script running, go to the TX ADMIN CMD (server CMD) and type
clearallsportsbetsdataTHIS WILL DELETE ALL THE BET DATA IN THE SQL INCLUDING PLAYER WALLETS
you can adjust what to wipe under server/commands.lua
2-3- Restart the resource zat-sportsbet !
Last updated