mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-17 06:16:02 +01:00
fix(jim-payments): fix support for renewed add support for fd
This commit is contained in:
@@ -1,6 +1,3 @@
|
|||||||
local QBCore = exports['qb-core']:GetCoreObject()
|
|
||||||
RegisterNetEvent('QBCore:Client:UpdateObject', function() QBCore = exports['qb-core']:GetCoreObject() end)
|
|
||||||
|
|
||||||
-- This script is a simple replacement for QB-Banking and QB-ATMs
|
-- This script is a simple replacement for QB-Banking and QB-ATMs
|
||||||
-- It uses QB-Input and server callbacks to retreive info about accounts and cash
|
-- It uses QB-Input and server callbacks to retreive info about accounts and cash
|
||||||
-- This requires QB-Target and has the location of every ATM, ATM prop and bank window
|
-- This requires QB-Target and has the location of every ATM, ATM prop and bank window
|
||||||
@@ -108,7 +105,7 @@ RegisterNetEvent('jim-payments:Client:ATM:use', function(data)
|
|||||||
--this grabs all the info from names to savings account numbers in the databases
|
--this grabs all the info from names to savings account numbers in the databases
|
||||||
local p = promise.new()
|
local p = promise.new()
|
||||||
QBCore.Functions.TriggerCallback('jim-payments:ATM:Find', function(cb) p:resolve(cb) end) local info = Citizen.Await(p)
|
QBCore.Functions.TriggerCallback('jim-payments:ATM:Find', function(cb) p:resolve(cb) end) local info = Citizen.Await(p)
|
||||||
if not Config.RenewedBanking then
|
if Config.Banking == "qb" then
|
||||||
local p = promise.new()
|
local p = promise.new()
|
||||||
QBCore.Functions.TriggerCallback('qb-bossmenu:server:GetAccount', function(cb) p:resolve(cb) end, PlayerJob.name) info.society = Citizen.Await(p)
|
QBCore.Functions.TriggerCallback('qb-bossmenu:server:GetAccount', function(cb) p:resolve(cb) end, PlayerJob.name) info.society = Citizen.Await(p)
|
||||||
local p2 = promise.new()
|
local p2 = promise.new()
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
local QBCore = exports['qb-core']:GetCoreObject()
|
|
||||||
RegisterNetEvent('QBCore:Client:UpdateObject', function() QBCore = exports['qb-core']:GetCoreObject() end)
|
|
||||||
|
|
||||||
PlayerJob = {}
|
PlayerJob = {}
|
||||||
PlayerGang = {}
|
PlayerGang = {}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Config = {
|
|||||||
-- Default Job Payment Systems --
|
-- Default Job Payment Systems --
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
RenewedBanking = false, -- Enable if using Renewed-Banking false if using QB-Management
|
Banking = "qb", -- qb, renewed, and fd currently default supported
|
||||||
|
|
||||||
ApGov = false, -- Toggle support for AP-Goverment Tax
|
ApGov = false, -- Toggle support for AP-Goverment Tax
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
local QBCore = exports['qb-core']:GetCoreObject()
|
|
||||||
RegisterNetEvent('QBCore:Server:UpdateObject', function() if source ~= '' then return false end QBCore = exports['qb-core']:GetCoreObject() end)
|
|
||||||
|
|
||||||
local function cv(amount)
|
local function cv(amount)
|
||||||
local formatted = amount
|
local formatted = amount
|
||||||
while true do
|
while true do
|
||||||
@@ -70,14 +67,23 @@ RegisterServerEvent('jim-payments:server:ATM:use', function(amount, billtype, ba
|
|||||||
elseif tonumber(society) >= amount then
|
elseif tonumber(society) >= amount then
|
||||||
triggerNotify(nil, Loc[Config.Lan].success["draw"]..cv(amount)..Loc[Config.Lan].success["fromthe"]..Player.PlayerData.job.label..Loc[Config.Lan].success["account"], "success", src)
|
triggerNotify(nil, Loc[Config.Lan].success["draw"]..cv(amount)..Loc[Config.Lan].success["fromthe"]..Player.PlayerData.job.label..Loc[Config.Lan].success["account"], "success", src)
|
||||||
Player.Functions.AddMoney('bank', amount)
|
Player.Functions.AddMoney('bank', amount)
|
||||||
if Config.RenewedBanking then TriggerEvent("qb-bossmenu:server:removeAccountMoney", tostring(Player.PlayerData.job.name), amount)
|
if Config.Banking == "renewed" then
|
||||||
else exports["qb-management"]:RemoveMoney(tostring(Player.PlayerData.job.name), amount) end
|
exports['Renewed-Banking']:removeAccountMoney(tostring(Player.PlayerData.job.name), amount)
|
||||||
|
elseif Config.Banking == "qb" then
|
||||||
|
exports["qb-management"]:RemoveMoney(tostring(Player.PlayerData.job.name), amount)
|
||||||
|
elseif Config.Banking == "fd" then
|
||||||
|
exports.fd_banking:RemoveMoney(tostring(Player.PlayerData.job.name), amount)
|
||||||
end
|
end
|
||||||
elseif billtype == "deposit" then
|
elseif billtype == "deposit" then
|
||||||
if bankB < amount then triggerNotify(nil, Loc[Config.Lan].error["nomoney_bank"], "error", src)
|
if bankB < amount then triggerNotify(nil, Loc[Config.Lan].error["nomoney_bank"], "error", src)
|
||||||
elseif bankB >= amount then
|
elseif bankB >= amount then
|
||||||
if Config.RenewedBanking then TriggerEvent("qb-bossmenu:server:addAccountMoney", tostring(Player.PlayerData.job.name), amount)
|
if Config.Banking == "qb" then
|
||||||
else exports["qb-management"]:AddMoney(tostring(Player.PlayerData.job.name), amount) end
|
exports['Renewed-Banking']:addAccountMoney(tostring(Player.PlayerData.job.name), amount)
|
||||||
|
elseif Config.Banking == "qb" then
|
||||||
|
exports["qb-management"]:AddMoney(tostring(Player.PlayerData.job.name), amount)
|
||||||
|
elseif Config.Banking == "fd" then
|
||||||
|
exports.fd_banking:AddMoney(tostring(Player.PlayerData.job.name), amount)
|
||||||
|
end
|
||||||
Player.Functions.RemoveMoney('bank', amount) Wait(1500)
|
Player.Functions.RemoveMoney('bank', amount) Wait(1500)
|
||||||
triggerNotify(nil, Loc[Config.Lan].success["deposited"]..cv(amount)..Loc[Config.Lan].success["into"]..Player.PlayerData.job.label..Loc[Config.Lan].success["account"], "success", src)
|
triggerNotify(nil, Loc[Config.Lan].success["deposited"]..cv(amount)..Loc[Config.Lan].success["into"]..Player.PlayerData.job.label..Loc[Config.Lan].success["account"], "success", src)
|
||||||
end
|
end
|
||||||
@@ -100,8 +106,13 @@ RegisterServerEvent('jim-payments:server:ATM:use', function(amount, billtype, ba
|
|||||||
local result = MySQL.Sync.fetchAll('SELECT * FROM players WHERE charinfo LIKE ?', {query})
|
local result = MySQL.Sync.fetchAll('SELECT * FROM players WHERE charinfo LIKE ?', {query})
|
||||||
if result[1] then
|
if result[1] then
|
||||||
local Reciever = QBCore.Functions.GetPlayerByCitizenId(result[1].citizenid)
|
local Reciever = QBCore.Functions.GetPlayerByCitizenId(result[1].citizenid)
|
||||||
if Config.RenewedBanking then TriggerEvent("qb-bossmenu:server:removeAccountMoney", tostring(Player.PlayerData.job.name), amount)
|
if Config.Banking == "renewed" then
|
||||||
else exports["qb-management"]:RemoveMoney(tostring(Player.PlayerData.job.name), amount) end
|
exports['Renewed-Banking']:removeAccountMoney(tostring(Player.PlayerData.job.name), amount)
|
||||||
|
elseif Config.Banking == "qb" then
|
||||||
|
exports["qb-management"]:RemoveMoney(tostring(Player.PlayerData.job.name), amount) end
|
||||||
|
elseif Config.Banking == "fd" then
|
||||||
|
exports.fd_banking:RemoveMoney(tostring(Player.PlayerData.job.name), amount)
|
||||||
|
end
|
||||||
if Reciever then
|
if Reciever then
|
||||||
Reciever.Functions.AddMoney('bank', amount)
|
Reciever.Functions.AddMoney('bank', amount)
|
||||||
triggerNotify(nil, Loc[Config.Lan].success["sent"]..amount..Loc[Config.Lan].success["to"]..Reciever.PlayerData.charinfo.firstname.." "..Reciever.PlayerData.charinfo.lastname, "success", src)
|
triggerNotify(nil, Loc[Config.Lan].success["sent"]..amount..Loc[Config.Lan].success["to"]..Reciever.PlayerData.charinfo.firstname.." "..Reciever.PlayerData.charinfo.lastname, "success", src)
|
||||||
@@ -122,14 +133,16 @@ RegisterServerEvent('jim-payments:server:ATM:use', function(amount, billtype, ba
|
|||||||
elseif tonumber(gsociety) >= amount then
|
elseif tonumber(gsociety) >= amount then
|
||||||
triggerNotify(nil, Loc[Config.Lan].success["draw"]..cv(amount)..Loc[Config.Lan].success["fromthe"]..Player.PlayerData.gang.label..Loc[Config.Lan].success["account"], "success", src)
|
triggerNotify(nil, Loc[Config.Lan].success["draw"]..cv(amount)..Loc[Config.Lan].success["fromthe"]..Player.PlayerData.gang.label..Loc[Config.Lan].success["account"], "success", src)
|
||||||
Player.Functions.AddMoney('bank', amount)
|
Player.Functions.AddMoney('bank', amount)
|
||||||
if Config.RenewedBanking then TriggerEvent("qb-gangmenu:server:removeAccountMoney", tostring(Player.PlayerData.gang.name), amount)
|
if Config.Banking == "renewed" then exports['Renewed-Banking']:removeAccountMoney( tostring(Player.PlayerData.gang.name), amount)
|
||||||
else exports["qb-management"]:RemoveGangMoney(tostring(Player.PlayerData.gang.name), amount) end
|
elseif Config.Banking == "qb" then exports["qb-management"]:RemoveGangMoney(tostring(Player.PlayerData.gang.name), amount)
|
||||||
|
elseif Config.Banking == "fd" then exports.fd_banking:RemoveGangMoney(tostring(Player.PlayerData.gang.name), amount) end
|
||||||
end
|
end
|
||||||
elseif billtype == "deposit" then
|
elseif billtype == "deposit" then
|
||||||
if bankB < amount then triggerNotify(nil, Loc[Config.Lan].error["nomoney_bank"], "error", src)
|
if bankB < amount then triggerNotify(nil, Loc[Config.Lan].error["nomoney_bank"], "error", src)
|
||||||
elseif bankB >= amount then
|
elseif bankB >= amount then
|
||||||
if Config.RenewedBanking then TriggerEvent("qb-gangmenu:server:addAccountMoney", tostring(Player.PlayerData.gang.name), amount)
|
if Config.Banking == "rewnewed" then exports['Renewed-Banking']:addAccountMoney(tostring(Player.PlayerData.gang.name), amount)
|
||||||
else exports["qb-management"]:AddGangMoney(tostring(Player.PlayerData.gang.name), amount) end
|
elseif Config.Banking == "qb" then exports["qb-management"]:AddGangMoney(tostring(Player.PlayerData.gang.name), amount)
|
||||||
|
elseif Config.Banking == "fd" then exports.fd_banking:AddGangMoney(tostring(Player.PlayerData.gang.name), amount) end
|
||||||
Player.Functions.RemoveMoney('bank', amount) Wait(1500)
|
Player.Functions.RemoveMoney('bank', amount) Wait(1500)
|
||||||
triggerNotify(nil, Loc[Config.Lan].success["deposited"]..cv(amount)..Loc[Config.Lan].success["into"]..Player.PlayerData.gang.label..Loc[Config.Lan].success["account"], "success", src)
|
triggerNotify(nil, Loc[Config.Lan].success["deposited"]..cv(amount)..Loc[Config.Lan].success["into"]..Player.PlayerData.gang.label..Loc[Config.Lan].success["account"], "success", src)
|
||||||
end
|
end
|
||||||
@@ -152,8 +165,13 @@ RegisterServerEvent('jim-payments:server:ATM:use', function(amount, billtype, ba
|
|||||||
local result = MySQL.Sync.fetchAll('SELECT * FROM players WHERE charinfo LIKE ?', {query})
|
local result = MySQL.Sync.fetchAll('SELECT * FROM players WHERE charinfo LIKE ?', {query})
|
||||||
if result[1] then
|
if result[1] then
|
||||||
local Reciever = QBCore.Functions.GetPlayerByCitizenId(result[1].citizenid)
|
local Reciever = QBCore.Functions.GetPlayerByCitizenId(result[1].citizenid)
|
||||||
if Config.RenewedBanking then TriggerEvent("qb-bossmenu:server:removeAccountMoney", tostring(Player.PlayerData.gang.name), amount)
|
if Config.Banking == "renewed" then
|
||||||
else exports["qb-management"]:RemoveGangMoney(tostring(Player.PlayerData.gang.name), amount) end
|
exports['Renewed-Banking']:removeAccountMoney( tostring(Player.PlayerData.gang.name), amount)
|
||||||
|
elseif Config.Banking == "qb" then
|
||||||
|
exports["qb-management"]:RemoveGangMoney(tostring(Player.PlayerData.gang.name), amount)
|
||||||
|
elseif Config.Banking == "fd" then
|
||||||
|
exports.fd_banking:RemoveGangMoney(tostring(Player.PlayerData.gang.name), amount)
|
||||||
|
end
|
||||||
if not Reciever then
|
if not Reciever then
|
||||||
Reciever.Functions.AddMoney('bank', amount)
|
Reciever.Functions.AddMoney('bank', amount)
|
||||||
triggerNotify(nil, Loc[Config.Lan].success["sent"]..amount..Loc[Config.Lan].success["to"]..Reciever.PlayerData.charinfo.firstname.." "..Reciever.PlayerData.charinfo.lastname, "success", src)
|
triggerNotify(nil, Loc[Config.Lan].success["sent"]..amount..Loc[Config.Lan].success["to"]..Reciever.PlayerData.charinfo.firstname.." "..Reciever.PlayerData.charinfo.lastname, "success", src)
|
||||||
@@ -213,7 +231,7 @@ QBCore.Functions.CreateCallback('jim-payments:ATM:Find', function(source, cb)
|
|||||||
local gsociety = 0
|
local gsociety = 0
|
||||||
|
|
||||||
-- If qb-management, grab info directly from database
|
-- If qb-management, grab info directly from database
|
||||||
if Config.RenewedBanking then
|
if not Config.Banking == "renewed" then
|
||||||
local result = MySQL.Sync.fetchAll('SELECT * FROM management_funds')
|
local result = MySQL.Sync.fetchAll('SELECT * FROM management_funds')
|
||||||
for _, v in pairs(result) do
|
for _, v in pairs(result) do
|
||||||
if Player.PlayerData.job.name == v.job_name then society = v.amount end
|
if Player.PlayerData.job.name == v.job_name then society = v.amount end
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
local QBCore = exports['qb-core']:GetCoreObject()
|
|
||||||
RegisterNetEvent('QBCore:Server:UpdateObject', function() if source ~= '' then return false end QBCore = exports['qb-core']:GetCoreObject() end)
|
|
||||||
|
|
||||||
local function cv(amount)
|
local function cv(amount)
|
||||||
local formatted = amount
|
local formatted = amount
|
||||||
@@ -23,18 +21,27 @@ RegisterServerEvent('jim-payments:Tickets:Give', function(data, biller, gang)
|
|||||||
local takecomm = math.floor(tonumber(data.amount) * Config.Jobs[data.society].Commission)
|
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 biller then -- If this is found, it ISN'T a phone payment, so add money to society here
|
||||||
if gang then
|
if gang then
|
||||||
if Config.RenewedBanking then exports['Renewed-Banking']:addAccountMoney(tostring(biller.PlayerData.gang.name), data.amount - takecomm)
|
if Config.Banking == "renewed" then
|
||||||
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
|
exports['Renewed-Banking']:addAccountMoney(tostring(biller.PlayerData.gang.name), data.amount - takecomm)
|
||||||
else
|
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" then
|
||||||
exports["qb-management"]:AddGangMoney(tostring(biller.PlayerData.gang.name), data.amount - takecomm)
|
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
|
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 == "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
|
||||||
end
|
end
|
||||||
elseif not gang then
|
elseif not gang then
|
||||||
if Config.RenewedBanking then exports['Renewed-Banking']:addAccountMoney(tostring(biller.PlayerData.job.name), data.amount - takecomm)
|
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
|
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
|
||||||
else
|
elseif Config.Banking == "qb" then
|
||||||
exports["qb-management"]:AddMoney(tostring(biller.PlayerData.job.name), data.amount - takecomm)
|
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
|
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 == "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
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif not biller then --Find the biller from their citizenid
|
elseif not biller then --Find the biller from their citizenid
|
||||||
@@ -186,13 +193,16 @@ RegisterServerEvent("jim-payments:server:PolCharge", function(citizen, price)
|
|||||||
if Config.ApGov then exports['ap-government']:chargeCityTax(billed.PlayerData.source, "Item", price) 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 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.RenewedBanking then exports['Renewed-Banking']:addAccountMoney(tostring(biller.PlayerData.job.name), (price - commission))
|
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
|
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
|
||||||
else
|
elseif Config.Banking == "qb" then
|
||||||
exports["qb-management"]:AddMoney(tostring(biller.PlayerData.job.name), (price - commission))
|
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
|
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 == "fd" then
|
||||||
|
exports.fd_banking: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.fd_banking:GetAccount(biller.PlayerData.job.name).."^7)") end
|
||||||
end
|
end
|
||||||
|
|
||||||
triggerNotify(nil, billed.PlayerData.charinfo.firstname..Loc[Config.Lan].success["charged"]..(price - commission), "success", src)
|
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)
|
triggerNotify(nil, Loc[Config.Lan].success["you_charged"]..(price - commission), nil, billed.PlayerData.source)
|
||||||
else
|
else
|
||||||
@@ -213,11 +223,15 @@ RegisterServerEvent("jim-payments:server:PolPopup", function(data)
|
|||||||
triggerNotify(nil, billed.PlayerData.charinfo.firstname..Loc[Config.Lan].success["accepted_pay"]..data.amount..Loc[Config.Lan].success["charge_end"], "success", data.biller)
|
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 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.RenewedBanking then exports['Renewed-Banking']:addAccountMoney(tostring(biller.PlayerData.job.name), data.amount - commission)
|
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
|
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
|
||||||
else
|
elseif Config.Banking == "qb" then
|
||||||
exports["qb-management"]:AddMoney(tostring(biller.PlayerData.job.name), data.amount - commission)
|
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
|
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 == "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
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
triggerNotify(nil, Loc[Config.Lan].error["declined_payment"], nil, src)
|
triggerNotify(nil, Loc[Config.Lan].error["declined_payment"], nil, src)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
local QBCore = exports['qb-core']:GetCoreObject()
|
QBCore = exports['qb-core']:GetCoreObject()
|
||||||
RegisterNetEvent('QBCore:Client:UpdateObject', function() QBCore = exports['qb-core']:GetCoreObject() end)
|
|
||||||
|
|
||||||
local time = 1000
|
local time = 1000
|
||||||
function loadModel(model) if not HasModelLoaded(model) then
|
function loadModel(model) if not HasModelLoaded(model) then
|
||||||
|
|||||||
Reference in New Issue
Block a user