mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-17 06:16:02 +01:00
Beta GKSPhone invoice support
This commit is contained in:
@@ -34,7 +34,7 @@ Config.PedPool = {
|
||||
[14] = `U_F_M_CasinoShop_01`,
|
||||
}
|
||||
|
||||
Config.Gabz = false -- "true" to enable Gabz Banking locations
|
||||
Config.Gabz = true -- "true" to enable Gabz Banking locations
|
||||
Config.useATM = true -- Enable this to use my ATM's
|
||||
Config.useBanks = true -- Enable this to use my banking stuff
|
||||
Config.BankBlips = true -- Enable this if you disabled qb-banking and need bank locations
|
||||
@@ -43,6 +43,10 @@ Config.ATMBlips = false -- Enable this if you are a pyscho and need every ATM to
|
||||
Config.PhoneBank = true -- Set this to false to use the popup payment system FOR CARD/BANK PAYMENTS instead of using phone invoices
|
||||
-- This doesn't affect Cash payments as they by default use confirmation now
|
||||
-- This is helpful for phones that don't support invoices well
|
||||
|
||||
Config.PhoneType = "qb" -- Change this setting to make invoices work with your phone script [still testing this currently]
|
||||
-- "qb" for qb-phone
|
||||
-- "gks"" for GKSPhone
|
||||
|
||||
Config.Commission = false -- Set this to true to enable Commissions and give the person charging a percentage of the total
|
||||
Config.CommissionAll = false -- Set this to true to give commission to workers clocked in
|
||||
@@ -179,6 +183,7 @@ Config.VanBankLocations = {
|
||||
vector4(247.08, 224.98, 106.29, 157.75), -- Pacific Bank Window 2
|
||||
},
|
||||
}
|
||||
|
||||
Config.GabzBankLocations = {
|
||||
["legion"] = {
|
||||
vector4(149.5, -1042.08, 29.37, 342.74), -- Legion Fleeca
|
||||
@@ -210,4 +215,4 @@ Config.GabzBankLocations = {
|
||||
vector4(259.02, 214.32, 106.28, 337.82), -- Pacficic Gabz 9+10
|
||||
vector4(254.27, 216.06, 106.28, 336.37), -- Pacficic Gabz 11+12
|
||||
}
|
||||
}
|
||||
}
|
||||
18
server.lua
18
server.lua
@@ -97,10 +97,20 @@ RegisterServerEvent("jim-payments:server:Charge", function(citizen, price, billt
|
||||
if Config.PhoneBank == false then
|
||||
TriggerClientEvent("jim-payments:client:PayPopup", billed.PlayerData.source, amount, src, billtype, img, biller.PlayerData.job.label)
|
||||
else
|
||||
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})
|
||||
TriggerClientEvent('qb-phone:RefreshPhone', billed.PlayerData.source)
|
||||
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})
|
||||
TriggerClientEvent('qb-phone:RefreshPhone', billed.PlayerData.source)
|
||||
elseif Config.PhoneType == "gks" then
|
||||
MySQL.Async.execute('INSERT INTO gksphone_invoices (citizenid, amount, society, sender, sendercitizenid) VALUES (@citizenid, @amount, @society, @sender, @sendercitizenid)', {
|
||||
['@citizenid'] = billed.PlayerData.citizenid,
|
||||
['@amount'] = amount,
|
||||
['@society'] = biller.PlayerData.job.name,
|
||||
['@sender'] = biller.PlayerData.charinfo.firstname,
|
||||
['@sendercitizenid'] = biller.PlayerData.citizenid
|
||||
})
|
||||
end
|
||||
TriggerClientEvent('QBCore:Notify', src, 'Invoice Successfully Sent', 'success')
|
||||
TriggerClientEvent('QBCore:Notify', billed.PlayerData.source, 'New Invoice Received')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user