mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-19 06:46:04 +01:00
Support of Society Bank Features using Tgiann-Bank
Modified functions for fetching society account balance, charging society account and funding society accounts using Tgiann-Bank script.
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
• Renewed-Banking
|
• Renewed-Banking
|
||||||
• fd_banking
|
• fd_banking
|
||||||
• okokBanking
|
• okokBanking
|
||||||
|
• Tgiann-bank
|
||||||
]]
|
]]
|
||||||
|
|
||||||
--- Retrieves the current balance of a society's bank account.
|
--- Retrieves the current balance of a society's bank account.
|
||||||
@@ -54,6 +55,14 @@ function getSocietyAccount(society)
|
|||||||
elseif isStarted("okokBanking") then
|
elseif isStarted("okokBanking") then
|
||||||
bankScript = "okokBanking"
|
bankScript = "okokBanking"
|
||||||
amount = exports['okokBanking']:GetAccount(society)
|
amount = exports['okokBanking']:GetAccount(society)
|
||||||
|
|
||||||
|
elseif isStarted("tgiann-bank") then
|
||||||
|
bankScript = "tgiann-bank"
|
||||||
|
if Jobs[society] then
|
||||||
|
amount = exports["tgiann-bank"]:GetJobAccountBalance(society)
|
||||||
|
else
|
||||||
|
amount = exports["tgiann-bank"]:GetGangAccountBalance(society)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if bankScript == "" then
|
if bankScript == "" then
|
||||||
@@ -104,6 +113,13 @@ function chargeSociety(society, amount)
|
|||||||
bankScript = "okokBanking"
|
bankScript = "okokBanking"
|
||||||
exports['okokBanking']:RemoveMoney(society, amount)
|
exports['okokBanking']:RemoveMoney(society, amount)
|
||||||
|
|
||||||
|
elseif isStarted("tgiann-bank") then
|
||||||
|
bankScript = "tgiann-bank"
|
||||||
|
if Jobs[society] then
|
||||||
|
exports["tgiann-bank"]:RemoveJobMoney(society, amount)
|
||||||
|
else
|
||||||
|
exports["tgiann-bank"]:RemoveGangMoney(society, amount)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if bankScript == "" then
|
if bankScript == "" then
|
||||||
@@ -122,7 +138,7 @@ end
|
|||||||
--- fundSociety("police", 500)
|
--- fundSociety("police", 500)
|
||||||
--- ```
|
--- ```
|
||||||
function fundSociety(society, amount)
|
function fundSociety(society, amount)
|
||||||
local bankScript, newAmount = "", 0
|
local bankScript, newAmount, success = "", 0, false
|
||||||
|
|
||||||
|
|
||||||
if isStarted("qb-banking") then
|
if isStarted("qb-banking") then
|
||||||
@@ -159,6 +175,13 @@ function fundSociety(society, amount)
|
|||||||
bankScript = "okokBanking"
|
bankScript = "okokBanking"
|
||||||
exports['okokBanking']:AddMoney(society, amount)
|
exports['okokBanking']:AddMoney(society, amount)
|
||||||
|
|
||||||
|
elseif isStarted("tgiann-bank") then
|
||||||
|
bankScript = "tgiann-bank"
|
||||||
|
if Jobs[society] then
|
||||||
|
exports["tgiann-bank"]:AddJobMoney(society, amount)
|
||||||
|
else
|
||||||
|
exports["tgiann-bank"]:AddGangMoney(society, amount)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if bankScript == "" then
|
if bankScript == "" then
|
||||||
|
|||||||
Reference in New Issue
Block a user