mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-16 22:06:02 +01:00
v3.0 Beta Push
This commit is contained in:
@@ -1,17 +1,6 @@
|
||||
local function cv(amount)
|
||||
local formatted = amount
|
||||
while true do
|
||||
formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')
|
||||
if (k==0) then
|
||||
break
|
||||
end
|
||||
end
|
||||
return formatted
|
||||
end
|
||||
|
||||
RegisterServerEvent('jim-payments:server:ATM:use', function(amount, billtype, baccount, account, society, gsociety)
|
||||
local src = source
|
||||
local Player = QBCore.Functions.GetPlayer(src)
|
||||
local Player = Core.Functions.GetPlayer(src)
|
||||
local cashB = Player.Functions.GetMoney("cash")
|
||||
local bankB = Player.Functions.GetMoney("bank")
|
||||
local amount = tonumber(amount)
|
||||
@@ -95,12 +84,12 @@ RegisterServerEvent('jim-payments:server:ATM:use', function(amount, billtype, ba
|
||||
baccount = newiban
|
||||
amount = tonumber(newAmount)
|
||||
|
||||
local Player = QBCore.Functions.GetPlayer(src)
|
||||
local Player = Core.Functions.GetPlayer(src)
|
||||
if (society - amount) >= 0 then
|
||||
local query = '%"account":"' .. baccount .. '"%'
|
||||
local result = MySQL.Sync.fetchAll('SELECT * FROM players WHERE charinfo LIKE ?', {query})
|
||||
if result[1] then
|
||||
local Reciever = QBCore.Functions.GetPlayerByCitizenId(result[1].citizenid)
|
||||
local Reciever = Core.Functions.GetPlayerByCitizenId(result[1].citizenid)
|
||||
if Config.Banking == "renewed" then exports['Renewed-Banking']:removeAccountMoney(tostring(Player.PlayerData.job.name), amount)
|
||||
elseif Config.Banking == "qb-management" then exports["qb-management"]:RemoveMoney(tostring(Player.PlayerData.job.name), amount)
|
||||
elseif Config.Banking == "qb-banking" then exports["qb-banking"]:RemoveMoney(tostring(Player.PlayerData.job.name), amount)
|
||||
@@ -153,12 +142,12 @@ RegisterServerEvent('jim-payments:server:ATM:use', function(amount, billtype, ba
|
||||
baccount = newiban
|
||||
amount = tonumber(newAmount)
|
||||
|
||||
local Player = QBCore.Functions.GetPlayer(src)
|
||||
local Player = Core.Functions.GetPlayer(src)
|
||||
if (gsociety - amount) >= 0 then
|
||||
local query = '%"account":"' .. baccount .. '"%'
|
||||
local result = MySQL.Sync.fetchAll('SELECT * FROM players WHERE charinfo LIKE ?', {query})
|
||||
if result[1] then
|
||||
local Reciever = QBCore.Functions.GetPlayerByCitizenId(result[1].citizenid)
|
||||
local Reciever = Core.Functions.GetPlayerByCitizenId(result[1].citizenid)
|
||||
if Config.Banking == "renewed" then exports['Renewed-Banking']:removeAccountMoney(tostring(Player.PlayerData.gang.name), amount)
|
||||
elseif Config.Banking == "qb-management" then exports["qb-management"]:RemoveGangMoney(tostring(Player.PlayerData.gang.name), amount)
|
||||
elseif Config.Banking == "qb-banking" then exports["qb-banking"]:RemoveGangMoney(tostring(Player.PlayerData.gang.name), amount)
|
||||
@@ -188,12 +177,12 @@ RegisterServerEvent('jim-payments:server:ATM:use', function(amount, billtype, ba
|
||||
baccount = newiban
|
||||
amount = tonumber(newAmount)
|
||||
|
||||
local Player = QBCore.Functions.GetPlayer(src)
|
||||
local Player = Core.Functions.GetPlayer(src)
|
||||
if (Player.PlayerData.money.bank - amount) >= 0 then
|
||||
local query = '%"account":"' .. baccount .. '"%'
|
||||
local result = MySQL.Sync.fetchAll('SELECT * FROM players WHERE charinfo LIKE ?', {query})
|
||||
if result[1] then
|
||||
local Reciever = QBCore.Functions.GetPlayerByCitizenId(result[1].citizenid)
|
||||
local Reciever = Core.Functions.GetPlayerByCitizenId(result[1].citizenid)
|
||||
Player.Functions.RemoveMoney('bank', amount)
|
||||
if Reciever then
|
||||
Reciever.Functions.AddMoney('bank', amount)
|
||||
@@ -211,8 +200,8 @@ RegisterServerEvent('jim-payments:server:ATM:use', function(amount, billtype, ba
|
||||
end
|
||||
end)
|
||||
|
||||
QBCore.Functions.CreateCallback('jim-payments:ATM:Find', function(source, cb)
|
||||
local Player = QBCore.Functions.GetPlayer(source)
|
||||
createCallback('jim-payments:GetInfo', function(source, cb)
|
||||
local Player = Core.Functions.GetPlayer(source)
|
||||
local name = Player.PlayerData.charinfo.firstname..' '..Player.PlayerData.charinfo.lastname
|
||||
local cid = Player.PlayerData.citizenid.." ["..source.."]"
|
||||
local cash = Player.Functions.GetMoney("cash")
|
||||
@@ -221,7 +210,7 @@ QBCore.Functions.CreateCallback('jim-payments:ATM:Find', function(source, cb)
|
||||
local society = 0
|
||||
local gsociety = 0
|
||||
|
||||
if Config.Banking == "qb-banking" then
|
||||
if Config.General.Banking == "qb-banking" then
|
||||
local result = MySQL.Sync.fetchAll('SELECT * FROM bank_accounts')
|
||||
for _, v in pairs(result) do
|
||||
if Player.PlayerData.job.name == v.account_name then society = v.account_balance end
|
||||
@@ -233,7 +222,7 @@ QBCore.Functions.CreateCallback('jim-payments:ATM:Find', function(source, cb)
|
||||
end
|
||||
|
||||
-- If qb-management, grab info directly from database
|
||||
elseif not Config.Banking == "renewed" then
|
||||
elseif not Config.General.Banking == "renewed" then
|
||||
local result = MySQL.Sync.fetchAll('SELECT * FROM management_funds')
|
||||
for _, v in pairs(result) do
|
||||
if Player.PlayerData.job.name == v.job_name then society = v.amount end
|
||||
@@ -257,22 +246,24 @@ QBCore.Functions.CreateCallback('jim-payments:ATM:Find', function(source, cb)
|
||||
accountID = result[1].citizenid
|
||||
savingBalance = result[1].account_balance
|
||||
end
|
||||
cb({name = name,
|
||||
cash = cash,
|
||||
bank = bank,
|
||||
account = account,
|
||||
cid = cid,
|
||||
savbal = savingBalance,
|
||||
aid = accountID,
|
||||
society = society,
|
||||
gsociety = gsociety})
|
||||
local retTable = {name = name,
|
||||
cash = cash,
|
||||
bank = bank,
|
||||
account = account,
|
||||
cid = cid,
|
||||
savbal = savingBalance,
|
||||
aid = accountID,
|
||||
society = society,
|
||||
gsociety = gsociety}
|
||||
if GetResourceState(OXLibExport):find("start") then return retTable
|
||||
else return cb(retTable) end
|
||||
end)
|
||||
|
||||
QBCore.Commands.Add("cashgive", Loc[Config.Lan].command["pay_user"], {}, false, function(source) TriggerClientEvent("jim-payments:client:ATM:give", source) end)
|
||||
Core.Commands.Add("cashgive", Loc[Config.Lan].command["pay_user"], {}, false, function(source) TriggerClientEvent("jim-payments:client:ATM:give", source) end)
|
||||
|
||||
RegisterServerEvent("jim-payments:server:ATM:give", function(citizen, price)
|
||||
local Player = QBCore.Functions.GetPlayer(source)
|
||||
local Reciever = QBCore.Functions.GetPlayer(tonumber(citizen))
|
||||
local Player = Core.Functions.GetPlayer(source)
|
||||
local Reciever = Core.Functions.GetPlayer(tonumber(citizen))
|
||||
local amount = tonumber(price)
|
||||
local balance = Player.Functions.GetMoney("cash")
|
||||
|
||||
|
||||
214
server/chargerserver.lua
Normal file
214
server/chargerserver.lua
Normal file
@@ -0,0 +1,214 @@
|
||||
AddEventHandler('onResourceStart', function(r) if GetCurrentResourceName() ~= r then return end
|
||||
for k in pairs(Config.Receipts.Jobs) do
|
||||
if not Jobs[k] and not Gangs[k] then
|
||||
print("Jim-Payments: Config.Receipts.Jobs searched for job/gang '"..k.."' and couldn't find it in the Shared")
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
registerCommand("cashregister", { Loc[Config.Lan].command["cash_reg"], {}, false, function(source) TriggerClientEvent("jim-payments:client:Charge", source, {}, true) end })
|
||||
|
||||
createCallback('jim-payments:MakePlayerList', function(source, cb)
|
||||
local onlineList = {}
|
||||
for _, v in pairs(Core.Functions.GetPlayers()) do
|
||||
local Player = getPlayer(v)
|
||||
onlineList[#onlineList+1] = {
|
||||
value = tonumber(v),
|
||||
text = "["..v.."] - "..Player.name
|
||||
}
|
||||
end
|
||||
if GetResourceState(OXLibExport):find("start") then return onlineList
|
||||
else cb(onlineList) end
|
||||
end)
|
||||
|
||||
RegisterServerEvent("jim-payments:server:Charge", function(citizen, price, billtype, img, outside, gang)
|
||||
print(citizen, price, billtype, img, outside, gang)
|
||||
local src = source
|
||||
local biller = Core.Functions.GetPlayer(src)
|
||||
local billed = Core.Functions.GetPlayer(tonumber(citizen))
|
||||
local amount = tonumber(price)
|
||||
local balance = billed.Functions.GetMoney(billtype)
|
||||
if amount and amount > 0 then
|
||||
if balance < amount then
|
||||
triggerNotify(nil, Loc[Config.Lan].error["customer_nocash"], "error", src)
|
||||
triggerNotify(nil, Loc[Config.Lan].error["you_nocash"], "error", tonumber(citizen))
|
||||
return
|
||||
end
|
||||
local label = biller.PlayerData.job.label
|
||||
if gang == true then label = biller.PlayerData.gang.label end
|
||||
if Config.General.PhoneBank == false or gang == true or billtype == "cash" then
|
||||
TriggerClientEvent("jim-payments:client:PayPopup", billed.PlayerData.source, amount, src, billtype, img, label, gang, outside)
|
||||
else
|
||||
if Config.General.PhoneType == "qb" then
|
||||
MySQL.Async.insert(
|
||||
'INSERT INTO phone_invoices (citizenid, amount, society, sender, sendercitizenid) VALUES (?, ?, ?, ?, ?)',
|
||||
{billed.PlayerData.citizenid, amount, biller.PlayerData.job.name, biller.PlayerData.charinfo.firstname, biller.PlayerData.citizenid}, function(id)
|
||||
if id then
|
||||
TriggerClientEvent('qb-phone:client:AcceptorDenyInvoice', billed.PlayerData.source, id, biller.PlayerData.charinfo.firstname, biller.PlayerData.job.name, biller.PlayerData.citizenid, amount, GetInvokingResource())
|
||||
end
|
||||
end)
|
||||
TriggerClientEvent('qb-phone:RefreshPhone', billed.PlayerData.source)
|
||||
elseif Config.General.PhoneType == "gks" then
|
||||
MySQL.Async.execute('INSERT INTO gksphone_invoices (citizenid, amount, society, sender, sendercitizenid, label) VALUES (@citizenid, @amount, @society, @sender, @sendercitizenid, @label)', {
|
||||
['@citizenid'] = billed.PlayerData.citizenid,
|
||||
['@amount'] = amount,
|
||||
['@society'] = biller.PlayerData.job.name,
|
||||
['@sender'] = biller.PlayerData.charinfo.firstname,
|
||||
['@sendercitizenid'] = biller.PlayerData.citizenid,
|
||||
['@label'] = biller.PlayerData.job.label,
|
||||
})
|
||||
TriggerClientEvent('gksphone:notifi', src, {title = 'Billing', message = Loc[Config.Lan].success["inv_succ"], img= '/html/static/img/icons/logo.png' })
|
||||
TriggerClientEvent('gksphone:notifi', billed.PlayerData.source, {title = 'Billing', message = Loc[Config.Lan].success["inv_recieved"], img= '/html/static/img/icons/logo.png' })
|
||||
end
|
||||
triggerNotify(nil, Loc[Config.Lan].success["inv_succ"], 'success', src)
|
||||
triggerNotify(nil, Loc[Config.Lan].success["inv_recieved"], nil, billed.PlayerData.source)
|
||||
end
|
||||
else triggerNotify(nil, Loc[Config.Lan].error["charge_zero"], 'error', source) return end
|
||||
end)
|
||||
|
||||
RegisterServerEvent("jim-payments:server:PayPopup", function(data)
|
||||
local src = source
|
||||
local billed = Core.Functions.GetPlayer(src)
|
||||
local biller = Core.Functions.GetPlayer(tonumber(data.biller))
|
||||
local newdata = {
|
||||
senderCitizenId = biller.PlayerData.citizenid,
|
||||
society = data.gang and biller.PlayerData.gang.name or biller.PlayerData.job.name,
|
||||
amount = data.amount
|
||||
}
|
||||
if data.accept then
|
||||
billed.Functions.RemoveMoney(tostring(data.billtype), data.amount)
|
||||
if Config.General.ApGov then exports['ap-government']:chargeCityTax(billed.PlayerData.source, "Item", data.amount) end
|
||||
TriggerEvent('jim-payments:Tickets:Give', newdata, biller, data.gang)
|
||||
triggerNotify(nil, billed.PlayerData.charinfo.firstname..Loc[Config.Lan].success["accepted_pay"]..data.amount..Loc[Config.Lan].success["payment"], "success", data.biller)
|
||||
elseif not data.accept then
|
||||
triggerNotify(nil, Loc[Config.Lan].success["declined"], "error", src)
|
||||
triggerNotify(nil, billed.PlayerData.charinfo.firstname..Loc[Config.Lan].error["decline_pay"]..data.amount..Loc[Config.Lan].success["payment"], "error", data.biller)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterServerEvent('jim-payments:Tickets:Give', function(data, biller, gang) local src = source
|
||||
local billed = Core.Functions.GetPlayer(src) -- This should always be from the person who accepted the payment
|
||||
local takecomm = math.floor(data.amount * Config.Receipts.Jobs[data.society].Commission)
|
||||
if biller ~= nil then -- If this is found, it ISN'T a phone payment, so add money to society here
|
||||
local billerGang, billerJob, amountChange, newAmount = tostring(biller.PlayerData.gang.name), tostring(biller.PlayerData.job.name), (data.amount - takecomm), 0
|
||||
|
||||
if gang then
|
||||
if Config.General.Banking == "renewed" then
|
||||
exports['Renewed-Banking']:addAccountMoney(billerGang, amountChange)
|
||||
newAmount = exports['Renewed-Banking']:getAccountMoney(billerGang)
|
||||
|
||||
elseif Config.General.Banking == "qb-management" or Config.General.Banking == "qb-banking" then
|
||||
exports[Config.General.Banking]:AddGangMoney(billerGang, amountChange)
|
||||
newAmount = exports[Config.General.Banking]:AddGangMoney(billerGang, amountChange)
|
||||
if Config.General.Banking == "qb-banking" then newAmount = newAmount["account_balance"] end
|
||||
|
||||
elseif Config.General.Banking == "fd" then
|
||||
exports["fd_banking"]:AddGangMoney(billerGang, amountChange)
|
||||
newAmount = exports["fd_banking"]:GetGangAccount(billerGang)
|
||||
|
||||
elseif Config.General.Banking == "okok" then
|
||||
exports['okokBanking']:AddMoney(billerGang, amountChange)
|
||||
newAmount = exports['okokBanking']:GetAccount(billerGang)
|
||||
end
|
||||
elseif not gang then
|
||||
if Config.General.Banking == "renewed" then
|
||||
exports['Renewed-Banking']:addAccountMoney(billerJob, amountChange)
|
||||
newAmount = exports['Renewed-Banking']:getAccountMoney(billerJob)
|
||||
|
||||
elseif Config.General.Banking == "qb-management" or Config.General.Banking == "qb-banking" then
|
||||
exports[Config.General.Banking]:AddMoney(billerJob, amountChange)
|
||||
newAmount = exports[Config.General.Banking]:GetAccount(billerJob, amountChange)
|
||||
if Config.General.Banking == "qb-banking" then newAmount = newAmount["account_balance"] end
|
||||
|
||||
elseif Config.General.Banking == "fd" then
|
||||
exports["fd_banking"]:AddMoney(billerJob, amountChange)
|
||||
newAmount = exports["fd_banking"]:GetAccount(billerJob)
|
||||
|
||||
elseif Config.General.Banking == "okok" then
|
||||
exports['okokBanking']:AddMoney(billerJob, amountChange)
|
||||
newAmount = exports['okokBanking']:GetAccount(billerJob)
|
||||
end
|
||||
|
||||
end
|
||||
print("^5Debug^7: ^3"..Config.General.Banking.."^7(^3"..(gang and "Gang" or "Job").."^7): ^2Adding ^7$"..amountChange.." ^2to account ^7'^6"..(gang and billerGang or billerJob).."^7' ($"..newAmount..")")
|
||||
if Config.System.Debug then
|
||||
end
|
||||
elseif not biller then --Find the biller from their citizenid
|
||||
for _, v in pairs(Core.Functions.GetPlayers()) do
|
||||
local Player = Core.Functions.GetPlayer(v)
|
||||
if Player.PlayerData.citizenid == data.senderCitizenId then biller = Player end
|
||||
end
|
||||
triggerNotify(nil, data.sender..Loc[Config.Lan].success["invoice_start"]..data.amount..Loc[Config.Lan].success["invoice_end"], "success", biller.PlayerData.source)
|
||||
end
|
||||
|
||||
-- If ticket system enabled, do this
|
||||
if (biller.PlayerData.job.onduty or gang) and Config.Receipts.TicketSystem then
|
||||
if data.amount >= Config.Receipts.Jobs[data.society].MinAmountforTicket then
|
||||
if Config.Receipts.TicketSystemAll then
|
||||
for _, v in pairs(Core.Functions.GetPlayers()) do
|
||||
local Player = Core.Functions.GetPlayer(v)
|
||||
if Player ~= nil or Player ~= billed then
|
||||
if gang then
|
||||
if Player.PlayerData.gang.name == data.society then
|
||||
TriggerEvent(GetCurrentResourceName()..":server:toggleItem", true, "payticket", 1, Player.PlayerData.source)
|
||||
triggerNotify(nil, Loc[Config.Lan].success["rec_rec"], 'success', Player.PlayerData.source)
|
||||
end
|
||||
else
|
||||
if Player.PlayerData.job.name == data.society and Player.PlayerData.job.onduty then
|
||||
TriggerEvent(GetCurrentResourceName()..":server:toggleItem", true, "payticket", 1, Player.PlayerData.source)
|
||||
triggerNotify(nil, Loc[Config.Lan].success["rec_rec"], 'success', Player.PlayerData.source)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
TriggerEvent(GetCurrentResourceName()..":server:toggleItem", true, "payticket", 1, biller.PlayerData.source)
|
||||
triggerNotify(nil, Loc[Config.Lan].success["rec_rec"], 'success', biller.PlayerData.source)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Commission section, does each config option separately
|
||||
local comm = tonumber(Config.Receipts.Jobs[data.society].Commission)
|
||||
if Config.Receipts.Commission and comm ~= 0 then
|
||||
if Config.Receipts.CommissionLimit and data.amount < Config.Receipts.Jobs[data.society].MinAmountforTicket then return end
|
||||
if Config.Receipts.CommissionDouble then
|
||||
biller.Functions.AddMoney("bank", math.floor(tonumber(data.amount) * (comm *2)))
|
||||
triggerNotify(nil, Loc[Config.Lan].success["recieved"]..math.floor(tonumber(data.amount) * (comm *2))..Loc[Config.Lan].success["commission"], "success", biller.PlayerData.source)
|
||||
else biller.Functions.AddMoney("bank", math.floor(tonumber(data.amount) *comm))
|
||||
triggerNotify(nil, Loc[Config.Lan].success["recieved"]..math.floor(tonumber(data.amount) * comm)..Loc[Config.Lan].success["commission"], "success", biller.PlayerData.source)
|
||||
end
|
||||
if Config.Receipts.CommissionAll then
|
||||
for _, v in pairs(Core.Functions.GetPlayers()) do
|
||||
local Player = Core.Functions.GetPlayer(v)
|
||||
if Player and Player ~= biller then
|
||||
if Player.PlayerData.job.name == data.society and Player.PlayerData.job.onduty then
|
||||
Player.Functions.AddMoney("bank", math.floor(tonumber(data.amount) * comm))
|
||||
triggerNotify(nil, Loc[Config.Lan].success["recieved"]..math.floor(tonumber(data.amount) * comm)..Loc[Config.Lan].success["commission"], "success", Player.PlayerData.source)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterServerEvent('jim-payments:Tickets:Sell', function()
|
||||
local Player = Core.Functions.GetPlayer(source)
|
||||
if not Player.Functions.GetItemByName("payticket") then triggerNotify(nil, Loc[Config.Lan].error["no_ticket_to"], 'error', source) return
|
||||
else
|
||||
tickets = Player.Functions.GetItemByName("payticket").amount
|
||||
Player.Functions.RemoveItem('payticket', tickets)
|
||||
pay = (tickets * Config.Receipts.Jobs[Player.PlayerData.job.name].PayPerTicket)
|
||||
Player.Functions.AddMoney('bank', pay, 'ticket-payment')
|
||||
TriggerClientEvent('inventory:client:ItemBox', source, Core.Shared.Items['payticket'], "remove", tickets)
|
||||
triggerNotify(nil, Loc[Config.Lan].success["trade_ticket_start"]..tickets..Loc[Config.Lan].success["trade_ticket_end"]..cv(pay), 'success', source)
|
||||
end
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
if Config.Usebzzz then
|
||||
Core.Functions.CreateUseableItem('terminal', function(source, item)
|
||||
TriggerClientEvent("jim-payments:client:Charge", source, {}, true)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
1
server/polchargeserver.lua
Normal file
1
server/polchargeserver.lua
Normal file
@@ -0,0 +1 @@
|
||||
-- Wip
|
||||
@@ -1,289 +0,0 @@
|
||||
|
||||
local function cv(amount)
|
||||
local formatted = amount
|
||||
while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if (k==0) then break end Wait(0) end
|
||||
return formatted
|
||||
end
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource) if GetCurrentResourceName() ~= resource then return end
|
||||
for k in pairs(Config.Jobs) do
|
||||
if not QBCore.Shared.Jobs[k] and not QBCore.Shared.Gangs[k] then
|
||||
print("Jim-Payments: Config.Jobs searched for job/gang '"..k.."' and couldn't find it in the Shared")
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
CreateThread(function()
|
||||
if Config.Enablecommand then
|
||||
QBCore.Commands.Add("cashregister", Loc[Config.Lan].command["cash_reg"], {}, false, function(source) TriggerClientEvent("jim-payments:client:Charge", source, {}, true) end)
|
||||
end
|
||||
end)
|
||||
|
||||
QBCore.Commands.Add("polcharge", Loc[Config.Lan].command["charge"], {}, false, function(source) TriggerClientEvent("jim-payments:client:PolCharge", source) end)
|
||||
|
||||
RegisterServerEvent('jim-payments:Tickets:Give', function(data, biller, gang)
|
||||
local billed = QBCore.Functions.GetPlayer(source) -- This should always be from the person who accepted the payment
|
||||
local takecomm = math.floor(tonumber(data.amount) * Config.Jobs[data.society].Commission)
|
||||
if biller then -- If this is found, it ISN'T a phone payment, so add money to society here
|
||||
if gang then
|
||||
if Config.Banking == "renewed" then
|
||||
exports['Renewed-Banking']:addAccountMoney(tostring(biller.PlayerData.gang.name), data.amount - takecomm)
|
||||
if Config.Debug then
|
||||
print("^5Debug^7: ^3Renewed-Banking^7(^3Gang^7): ^2Adding ^7$^6"..data.amount - takecomm.." ^2to account ^7'^6"..tostring(biller.PlayerData.gang.name).."^7' ($^6"..exports['Renewed-Banking']:getAccountMoney(biller.PlayerData.gang.name).."^7)") end
|
||||
elseif Config.Banking == "qb-management" then
|
||||
exports["qb-management"]:AddGangMoney(tostring(biller.PlayerData.gang.name), data.amount - takecomm)
|
||||
if Config.Debug then print("^5Debug^7: ^3QB-Management^7(^3Gang^7): ^2Adding ^7$^6"..data.amount - takecomm.." ^2to account ^7'^6"..tostring(biller.PlayerData.gang.name).."^7' ($^6"..exports["qb-management"]:GetGangAccount(biller.PlayerData.gang.name).."^7)") end
|
||||
elseif Config.Banking == "qb-banking" then
|
||||
exports["qb-banking"]:AddGangMoney(tostring(biller.PlayerData.gang.name), data.amount - takecomm)
|
||||
if Config.Debug then print("^5Debug^7: ^3QB-Banking^7(^3Gang^7): ^2Adding ^7$^6"..data.amount - takecomm.." ^2to account ^7'^6"..tostring(biller.PlayerData.gang.name).."^7' ($^6"..exports["qb-banking"]:GetGangAccount(biller.PlayerData.gang.name).."^7)") end
|
||||
elseif Config.Banking == "fd" then
|
||||
exports.fd_banking:AddGangMoney(tostring(biller.PlayerData.gang.name), data.amount - takecomm)
|
||||
if Config.Debug then print("^5Debug^7: ^3FD-Banking^7(^3Gang^7): ^2Adding ^7$^6"..data.amount - takecomm.." ^2to account ^7'^6"..tostring(biller.PlayerData.gang.name).."^7' ($^6"..exports.fd_banking:GetGangAccount(biller.PlayerData.gang.name).."^7)") end
|
||||
elseif Config.Banking == "okok" then
|
||||
exports['okokBanking']:AddMoney(tostring(biller.PlayerData.gang.name), data.amount - takecomm)
|
||||
if Config.Debug then print("^5Debug^7: ^3okokBanking^7(^3Job^7): ^2Adding ^7$^6"..data.amount - takecomm.." ^2to account ^7'^6"..tostring(biller.PlayerData.job.name).."^7' ($^6"..exports['okokBanking']:GetAccount(biller.PlayerData.gang.name).."^7)") end
|
||||
end
|
||||
elseif not gang then
|
||||
if Config.Banking == "renewed"
|
||||
then exports['Renewed-Banking']:addAccountMoney(tostring(biller.PlayerData.job.name), data.amount - takecomm)
|
||||
if Config.Debug then print("^5Debug^7: ^3Renewed-Banking^7(^3Job^7): ^2Adding ^7$^6"..data.amount - takecomm.." ^2to account ^7'^6"..tostring(biller.PlayerData.job.name).."^7' ($^6"..tostring(exports['Renewed-Banking']:getAccountMoney(biller.PlayerData.job.name)).."^7)") end
|
||||
elseif Config.Banking == "qb-management" then
|
||||
exports["qb-management"]:AddMoney(tostring(biller.PlayerData.job.name), data.amount - takecomm)
|
||||
if Config.Debug then print("^5Debug^7: ^3QB-Management^7(^3Job^7): ^2Adding ^7$^6"..data.amount - takecomm.." ^2to account ^7'^6"..tostring(biller.PlayerData.job.name).."^7' ($^6"..exports["qb-management"]:GetAccount(biller.PlayerData.job.name).."^7)") end
|
||||
elseif Config.Banking == "qb-banking" then
|
||||
exports["qb-banking"]:AddMoney(tostring(biller.PlayerData.job.name), data.amount - takecomm)
|
||||
if Config.Debug then print("^5Debug^7: ^3QB-Banking^7(^3Job^7): ^2Adding ^7$^6"..data.amount - takecomm.." ^2to account ^7'^6"..tostring(biller.PlayerData.job.name).."^7' ($^6^7)") end
|
||||
elseif Config.Banking == "fd" then
|
||||
exports.fd_banking:AddMoney(tostring(biller.PlayerData.job.name), data.amount - takecomm)
|
||||
if Config.Debug then print("^5Debug^7: ^3FD-Banking^7(^3Job^7): ^2Adding ^7$^6"..data.amount - takecomm.." ^2to account ^7'^6"..tostring(biller.PlayerData.job.name).."^7' ($^6"..exports.fd_banking:GetAccount(biller.PlayerData.job.name).."^7)") end
|
||||
elseif Config.Banking == "okok" then
|
||||
exports['okokBanking']:AddMoney(tostring(biller.PlayerData.job.name), data.amount - takecomm)
|
||||
if Config.Debug then print("^5Debug^7: ^3okokBanking^7(^3Job^7): ^2Adding ^7$^6"..data.amount - takecomm.." ^2to account ^7'^6"..tostring(biller.PlayerData.job.name).."^7' ($^6"..exports['okokBanking']:GetAccount(biller.PlayerData.job.name).."^7)") end
|
||||
end
|
||||
end
|
||||
elseif not biller then --Find the biller from their citizenid
|
||||
for _, v in pairs(QBCore.Functions.GetPlayers()) do
|
||||
local Player = QBCore.Functions.GetPlayer(v)
|
||||
if Player.PlayerData.citizenid == data.senderCitizenId then biller = Player end
|
||||
end
|
||||
triggerNotify(nil, data.sender..Loc[Config.Lan].success["invoice_start"]..data.amount..Loc[Config.Lan].success["invoice_end"], "success", biller.PlayerData.source)
|
||||
end
|
||||
|
||||
-- If ticket system enabled, do this
|
||||
if (biller.PlayerData.job.onduty or gang) and Config.TicketSystem then
|
||||
if data.amount >= Config.Jobs[data.society].MinAmountforTicket then
|
||||
if Config.TicketSystemAll then
|
||||
for _, v in pairs(QBCore.Functions.GetPlayers()) do
|
||||
local Player = QBCore.Functions.GetPlayer(v)
|
||||
if Player ~= nil or Player ~= billed then
|
||||
if gang then
|
||||
if Player.PlayerData.gang.name == data.society then
|
||||
if Player.Functions.AddItem('payticket', 1) then TriggerClientEvent('inventory:client:ItemBox', Player.PlayerData.source, QBCore.Shared.Items['payticket'], "add", 1) end
|
||||
triggerNotify(nil, Loc[Config.Lan].success["rec_rec"], 'success', Player.PlayerData.source)
|
||||
end
|
||||
else
|
||||
if Player.PlayerData.job.name == data.society and Player.PlayerData.job.onduty then
|
||||
if Player.Functions.AddItem('payticket', 1) then TriggerClientEvent('inventory:client:ItemBox', Player.PlayerData.source, QBCore.Shared.Items['payticket'], "add", 1) end
|
||||
triggerNotify(nil, Loc[Config.Lan].success["rec_rec"], 'success', Player.PlayerData.source)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
if biller.Functions.AddItem('payticket', 1) then TriggerClientEvent('inventory:client:ItemBox', biller.PlayerData.source, QBCore.Shared.Items['payticket'], "add", 1) end
|
||||
triggerNotify(nil, Loc[Config.Lan].success["rec_rec"], 'success', biller.PlayerData.source)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Commission section, does each config option separately
|
||||
local comm = tonumber(Config.Jobs[data.society].Commission)
|
||||
if Config.Commission and comm ~= 0 then
|
||||
if Config.CommissionLimit and data.amount < Config.Jobs[data.society].MinAmountforTicket then return end
|
||||
if Config.CommissionDouble then
|
||||
biller.Functions.AddMoney("bank", math.floor(tonumber(data.amount) * (comm *2)))
|
||||
triggerNotify(nil, Loc[Config.Lan].success["recieved"]..math.floor(tonumber(data.amount) * (comm *2))..Loc[Config.Lan].success["commission"], "success", biller.PlayerData.source)
|
||||
else biller.Functions.AddMoney("bank", math.floor(tonumber(data.amount) *comm))
|
||||
triggerNotify(nil, Loc[Config.Lan].success["recieved"]..math.floor(tonumber(data.amount) * comm)..Loc[Config.Lan].success["commission"], "success", biller.PlayerData.source)
|
||||
end
|
||||
if Config.CommissionAll then
|
||||
for _, v in pairs(QBCore.Functions.GetPlayers()) do
|
||||
local Player = QBCore.Functions.GetPlayer(v)
|
||||
if Player and Player ~= biller then
|
||||
if Player.PlayerData.job.name == data.society and Player.PlayerData.job.onduty then
|
||||
Player.Functions.AddMoney("bank", math.floor(tonumber(data.amount) * comm))
|
||||
triggerNotify(nil, Loc[Config.Lan].success["recieved"]..math.floor(tonumber(data.amount) * comm)..Loc[Config.Lan].success["commission"], "success", Player.PlayerData.source)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterServerEvent('jim-payments:Tickets:Sell', function()
|
||||
local Player = QBCore.Functions.GetPlayer(source)
|
||||
if not Player.Functions.GetItemByName("payticket") then triggerNotify(nil, Loc[Config.Lan].error["no_ticket_to"], 'error', source) return
|
||||
else
|
||||
tickets = Player.Functions.GetItemByName("payticket").amount
|
||||
Player.Functions.RemoveItem('payticket', tickets)
|
||||
pay = (tickets * Config.Jobs[Player.PlayerData.job.name].PayPerTicket)
|
||||
Player.Functions.AddMoney('bank', pay, 'ticket-payment')
|
||||
TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items['payticket'], "remove", tickets)
|
||||
triggerNotify(nil, Loc[Config.Lan].success["trade_ticket_start"]..tickets..Loc[Config.Lan].success["trade_ticket_end"]..cv(pay), 'success', source)
|
||||
end
|
||||
end)
|
||||
|
||||
QBCore.Functions.CreateCallback('jim-payments:Ticket:Count', function(source, cb)
|
||||
cb(QBCore.Functions.GetPlayer(source).Functions.GetItemByName('payticket'))
|
||||
end)
|
||||
|
||||
RegisterServerEvent("jim-payments:server:Charge", function(citizen, price, billtype, img, outside, gang)
|
||||
local src = source
|
||||
local biller = QBCore.Functions.GetPlayer(src)
|
||||
local billed = QBCore.Functions.GetPlayer(tonumber(citizen))
|
||||
local amount = tonumber(price)
|
||||
local balance = billed.Functions.GetMoney(billtype)
|
||||
if amount and amount > 0 then
|
||||
if balance < amount then
|
||||
triggerNotify(nil, Loc[Config.Lan].error["customer_nocash"], "error", src)
|
||||
triggerNotify(nil, Loc[Config.Lan].error["you_nocash"], "error", tonumber(citizen))
|
||||
return
|
||||
end
|
||||
local label = biller.PlayerData.job.label
|
||||
if gang == true then label = biller.PlayerData.gang.label end
|
||||
if Config.PhoneBank == false or gang == true or billtype == "cash" then
|
||||
TriggerClientEvent("jim-payments:client:PayPopup", billed.PlayerData.source, amount, src, billtype, img, label, gang, outside)
|
||||
else
|
||||
if Config.PhoneType == "qb" then
|
||||
MySQL.Async.insert(
|
||||
'INSERT INTO phone_invoices (citizenid, amount, society, sender, sendercitizenid) VALUES (?, ?, ?, ?, ?)',
|
||||
{billed.PlayerData.citizenid, amount, biller.PlayerData.job.name, biller.PlayerData.charinfo.firstname, biller.PlayerData.citizenid}, function(id)
|
||||
if id then
|
||||
TriggerClientEvent('qb-phone:client:AcceptorDenyInvoice', billed.PlayerData.source, id, biller.PlayerData.charinfo.firstname, biller.PlayerData.job.name, biller.PlayerData.citizenid, amount, GetInvokingResource())
|
||||
end
|
||||
end)
|
||||
TriggerClientEvent('qb-phone:RefreshPhone', billed.PlayerData.source)
|
||||
elseif Config.PhoneType == "gks" then
|
||||
MySQL.Async.execute('INSERT INTO gksphone_invoices (citizenid, amount, society, sender, sendercitizenid, label) VALUES (@citizenid, @amount, @society, @sender, @sendercitizenid, @label)', {
|
||||
['@citizenid'] = billed.PlayerData.citizenid,
|
||||
['@amount'] = amount,
|
||||
['@society'] = biller.PlayerData.job.name,
|
||||
['@sender'] = biller.PlayerData.charinfo.firstname,
|
||||
['@sendercitizenid'] = biller.PlayerData.citizenid,
|
||||
['@label'] = biller.PlayerData.job.label,
|
||||
})
|
||||
TriggerClientEvent('gksphone:notifi', src, {title = 'Billing', message = Loc[Config.Lan].success["inv_succ"], img= '/html/static/img/icons/logo.png' })
|
||||
TriggerClientEvent('gksphone:notifi', billed.PlayerData.source, {title = 'Billing', message = Loc[Config.Lan].success["inv_recieved"], img= '/html/static/img/icons/logo.png' })
|
||||
end
|
||||
triggerNotify(nil, Loc[Config.Lan].success["inv_succ"], 'success', src)
|
||||
triggerNotify(nil, Loc[Config.Lan].success["inv_recieved"], nil, billed.PlayerData.source)
|
||||
end
|
||||
else triggerNotify(nil, Loc[Config.Lan].error["charge_zero"], 'error', source) return end
|
||||
end)
|
||||
|
||||
RegisterServerEvent("jim-payments:server:PayPopup", function(data)
|
||||
local src = source
|
||||
local billed = QBCore.Functions.GetPlayer(src)
|
||||
local biller = QBCore.Functions.GetPlayer(tonumber(data.biller))
|
||||
local newdata = { senderCitizenId = biller.PlayerData.citizenid, society = biller.PlayerData.job.name, amount = data.amount }
|
||||
if data.gang == true then newdata.society = biller.PlayerData.gang.name end
|
||||
if data.accept == true then
|
||||
billed.Functions.RemoveMoney(tostring(data.billtype), data.amount)
|
||||
if Config.ApGov then exports['ap-government']:chargeCityTax(billed.PlayerData.source, "Item", data.amount) end
|
||||
TriggerEvent('jim-payments:Tickets:Give', newdata, biller, data.gang)
|
||||
triggerNotify(nil, billed.PlayerData.charinfo.firstname..Loc[Config.Lan].success["accepted_pay"]..data.amount..Loc[Config.Lan].success["payment"], "success", data.biller)
|
||||
elseif data.accept == false then
|
||||
triggerNotify(nil, Loc[Config.Lan].success["declined"], nil, src)
|
||||
triggerNotify(nil, billed.PlayerData.charinfo.firstname..Loc[Config.Lan].error["decline_pay"]..data.amount..Loc[Config.Lan].success["payment"], "error", data.biller)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterServerEvent("jim-payments:server:PolCharge", function(citizen, price)
|
||||
local src = source
|
||||
local biller = QBCore.Functions.GetPlayer(src)
|
||||
local billed = QBCore.Functions.GetPlayer(tonumber(citizen))
|
||||
local price = math.floor(tonumber(price))
|
||||
local commission = math.floor(price * Config.FineJobs[biller.PlayerData.job.name].Commission)
|
||||
if price > 0 then
|
||||
if not Config.FineJobConfirmation then
|
||||
if billed.Functions.RemoveMoney("bank", price) then if Config.Debug then print("^5Debug^7: ^3PolCharge^7 - ^2Player^7(^6"..billed.PlayerData.source.."^7) ^2charged ^7$^6"..price.."^7") end end
|
||||
if Config.ApGov then exports['ap-government']:chargeCityTax(billed.PlayerData.source, "Item", price) end
|
||||
if biller.Functions.AddMoney("bank", commission) then if Config.Debug then print("^5Debug^7: ^3PolCharge^7 - ^2Commission of ^7$^6"..commission.." ^2sent to Player^7(^6"..biller.PlayerData.source.."^7)") end end
|
||||
|
||||
if Config.Banking == "renewed" then
|
||||
exports['Renewed-Banking']:addAccountMoney(tostring(biller.PlayerData.job.name), (price - commission))
|
||||
if Config.Debug then print("^5Debug^7: ^3Renewed-Banking^7(^3Job^7): ^2Adding ^7$^6"..(price - commission).." ^2to account ^7'^6"..tostring(biller.PlayerData.job.name).."^7' ($^6"..exports['Renewed-Banking']:getAccountMoney((biller.PlayerData.job.name).."^7)")) end
|
||||
elseif Config.Banking == "qb-management" then
|
||||
exports["qb-management"]:AddMoney(tostring(biller.PlayerData.job.name), (price - commission))
|
||||
if Config.Debug then print("^5Debug^7: ^3QB-Management^7(^3Job^7): ^2Adding ^7$^6"..(price - takecomm).." ^2to account ^7'^6"..tostring(biller.PlayerData.job.name).."^7' ($^6"..exports["qb-management"]:GetAccount(biller.PlayerData.job.name).."^7)") end
|
||||
elseif Config.Banking == "qb-banking" then
|
||||
exports["qb-banking"]:AddMoney(tostring(biller.PlayerData.job.name), (price - commission))
|
||||
if Config.Debug then print("^5Debug^7: ^3QB-Banking^7(^3Job^7): ^2Adding ^7$^6"..(price - takecomm).." ^2to account ^7'^6"..tostring(biller.PlayerData.job.name).."^7' ($^6"..exports["qb-banking"]:GetAccount(biller.PlayerData.job.name).."^7)") end
|
||||
elseif Config.Banking == "fd" then
|
||||
exports.fd_banking:AddMoney(tostring(biller.PlayerData.job.name), (price - commission))
|
||||
if Config.Debug then print("^5Debug^7: ^3FD-Banking^7(^3Job^7): ^2Adding ^7$^6"..(price - takecomm).." ^2to account ^7'^6"..tostring(biller.PlayerData.job.name).."^7' ($^6"..exports.fd_banking:GetAccount(biller.PlayerData.job.name).."^7)") end
|
||||
elseif Config.Banking == "okok" then
|
||||
exports['okokBanking']:AddMoney(tostring(biller.PlayerData.job.name), (price - commission))
|
||||
if Config.Debug then print("^5Debug^7: ^3okokBanking^7(^3Job^7): ^2Adding ^7$^6"..(price - takecomm).." ^2to account ^7'^6"..tostring(biller.PlayerData.job.name).."^7' ($^6"..exports['okokBanking']:GetAccount(biller.PlayerData.job.name).."^7)") end
|
||||
|
||||
end
|
||||
triggerNotify(nil, billed.PlayerData.charinfo.firstname..Loc[Config.Lan].success["charged"]..(price - commission), "success", src)
|
||||
triggerNotify(nil, Loc[Config.Lan].success["you_charged"]..(price - commission), nil, billed.PlayerData.source)
|
||||
else
|
||||
TriggerClientEvent("jim-payments:client:PolPopup", billed.PlayerData.source, price, src, biller.PlayerData.job.label)
|
||||
end
|
||||
else triggerNotify(nil, Loc[Config.Lan].error["charge_zero"], 'error', source) return end
|
||||
end)
|
||||
|
||||
RegisterServerEvent("jim-payments:server:PolPopup", function(data)
|
||||
local src = source
|
||||
local billed = QBCore.Functions.GetPlayer(src)
|
||||
local biller = QBCore.Functions.GetPlayer(tonumber(data.biller))
|
||||
data.amount = math.floor(data.amount)
|
||||
local commission = math.floor(tonumber(data.amount) * Config.FineJobs[biller.PlayerData.job.name].Commission)
|
||||
if data.accept == true then
|
||||
if billed.Functions.RemoveMoney("bank", data.amount) then if Config.Debug then print("^5Debug^7: ^3PolCharge^7 - ^2Player^7(^6"..billed.PlayerData.source.."^7) ^2charged ^7$^6"..data.amount.."^7") end end
|
||||
if Config.ApGov then exports['ap-government']:chargeCityTax(billed.PlayerData.source, "Item", data.amount) end
|
||||
triggerNotify(nil, billed.PlayerData.charinfo.firstname..Loc[Config.Lan].success["accepted_pay"]..data.amount..Loc[Config.Lan].success["charge_end"], "success", data.biller)
|
||||
if biller.Functions.AddMoney("bank", commission) then if Config.Debug then print("^5Debug^7: ^3PolCharge^7 - ^2Commission^2 of ^7$^6"..commission.." ^2sent to Player^7(^6"..biller.PlayerData.source.."^7)") end end
|
||||
|
||||
if Config.Banking == "renewed" then
|
||||
exports['Renewed-Banking']:addAccountMoney(tostring(biller.PlayerData.job.name), data.amount - commission)
|
||||
if Config.Debug then print("^5Debug^7: ^3Renewed-Banking^7(^3Job^7): ^2Adding ^7$^6"..(data.amount - commission).." ^2to account ^7'^6"..tostring(biller.PlayerData.job.name).."^7' ($^6"..exports['Renewed-Banking']:getAccountMoney((biller.PlayerData.job.name).."^7)")) end
|
||||
elseif Config.Banking == "qb-management" then
|
||||
exports["qb-management"]:AddMoney(tostring(biller.PlayerData.job.name), data.amount - commission)
|
||||
if Config.Debug then print("^5Debug^7: ^3QB-Management^7(^3Job^7): ^2Adding ^7$^6"..data.amount - takecomm.." ^2to account ^7'^6"..tostring(biller.PlayerData.job.name).."^7' ($^6"..exports["qb-management"]:GetAccount(biller.PlayerData.job.name).."^7)") end
|
||||
elseif Config.Banking == "qb-banking" then
|
||||
exports["qb-banking"]:AddMoney(tostring(biller.PlayerData.job.name), data.amount - commission)
|
||||
if Config.Debug then print("^5Debug^7: ^3QB-Banking^7(^3Job^7): ^2Adding ^7$^6"..data.amount - takecomm.." ^2to account ^7'^6"..tostring(biller.PlayerData.job.name).."^7' ($^6"..exports["qb-banking"]:GetAccount(biller.PlayerData.job.name).."^7)") end
|
||||
elseif Config.Banking == "fd" then
|
||||
exports.fd_banking:AddMoney(tostring(biller.PlayerData.job.name), data.amount - commission)
|
||||
if Config.Debug then print("^5Debug^7: ^3FD-Banking^7(^3Job^7): ^2Adding ^7$^6"..data.amount - takecomm.." ^2to account ^7'^6"..tostring(biller.PlayerData.job.name).."^7' ($^6"..exports.fd_banking:GetAccount(biller.PlayerData.job.name).."^7)") end
|
||||
elseif Config.Banking == "okok" then
|
||||
exports['okokBanking']:AddMoney(tostring(biller.PlayerData.job.name), data.amount - commission)
|
||||
if Config.Debug then print("^5Debug^7: ^3okokBanking^7(^3Job^7): ^2Adding ^7$^6"..data.amount - takecomm.." ^2to account ^7'^6"..tostring(biller.PlayerData.job.name).."^7' ($^6"..exports['okokBanking']:GetAccount(biller.PlayerData.job.name).."^7)") end
|
||||
end
|
||||
else
|
||||
triggerNotify(nil, Loc[Config.Lan].error["declined_payment"], nil, src)
|
||||
triggerNotify(nil, billed.PlayerData.charinfo.firstname.." declined the $"..data.amount..Loc[Config.Lan].success["charge_end"], "error", data.biller)
|
||||
end
|
||||
end)
|
||||
|
||||
QBCore.Functions.CreateCallback('jim-payments:MakePlayerList', function(source, cb)
|
||||
local onlineList = {}
|
||||
for _, v in pairs(QBCore.Functions.GetPlayers()) do
|
||||
local P = QBCore.Functions.GetPlayer(v)
|
||||
onlineList[#onlineList+1] = { value = tonumber(v), text = "["..v.."] - "..P.PlayerData.charinfo.firstname..' '..P.PlayerData.charinfo.lastname }
|
||||
end
|
||||
cb(onlineList)
|
||||
end)
|
||||
|
||||
|
||||
CreateThread(function()
|
||||
if Config.Usebzzz then
|
||||
QBCore.Functions.CreateUseableItem('terminal', function(source, item)
|
||||
TriggerClientEvent("jim-payments:client:Charge", source, {}, true)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
Reference in New Issue
Block a user