migrated management to banking
also fixed loadmodel typo
This commit is contained in:
1 parent
ca11f2954e
commit
0970bdd604
12 files changed
+56
-56
No files matched your search
@@ -90,6 +90,7 @@ end)
|
||||
-- ▄█▀ █▄▄ █▀▄ ▀▄▀ █▄▄ █▀▄
|
||||
if not IsDuplicityVersion() then goto client end
|
||||
Bridge.RegisterModule('Version', Version)
|
||||
Bridge.RegisterModule('Banking', Banking)
|
||||
|
||||
-- ▄▀▀ █ █ ██▀ █▄ █ ▀█▀
|
||||
-- ▀▄▄ █▄▄ █ █▄▄ █ ▀█ █
|
||||
|
||||
@@ -12,7 +12,7 @@ local function SpawnEntity(entityData)
|
||||
-- for k, v in pairs(entityData.args) do
|
||||
-- print(string.format("SpawnEntity %s: %s", k, v))
|
||||
-- end
|
||||
local loaded, model = Utility.GetModel(entityData.model)
|
||||
local loaded, model = Utility.LoadModel(entityData.model)
|
||||
if not loaded then
|
||||
print(string.format("[ClientEntity] Failed to load model %s for entity %s", entityData.model, entityData.id))
|
||||
return
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
---@diagnostic disable: duplicate-set-field
|
||||
Managment = Managment or {}
|
||||
Banking = Banking or {}
|
||||
|
||||
---This will get the name of the Managment system being being used.
|
||||
---@return string
|
||||
Managment.GetManagmentName = function()
|
||||
Banking.GetManagmentName = function()
|
||||
return 'default'
|
||||
end
|
||||
|
||||
---This will return a number
|
||||
---@param account string
|
||||
---@return number
|
||||
Managment.GetAccountMoney = function(account)
|
||||
Banking.GetAccountMoney = function(account)
|
||||
return 0, print("The resource you are using does not support this function.")
|
||||
end
|
||||
|
||||
@@ -19,7 +19,7 @@ end
|
||||
---@param amount number
|
||||
---@param reason string
|
||||
---@return boolean
|
||||
Managment.AddAccountMoney = function(account, amount, reason)
|
||||
Banking.AddAccountMoney = function(account, amount, reason)
|
||||
return false, print("The resource you are using does not support this function.")
|
||||
end
|
||||
|
||||
@@ -28,8 +28,8 @@ end
|
||||
---@param amount number
|
||||
---@param reason string
|
||||
---@return boolean
|
||||
Managment.RemoveAccountMoney = function(account, amount, reason)
|
||||
Banking.RemoveAccountMoney = function(account, amount, reason)
|
||||
return false, print("The resource you are using does not support this function.")
|
||||
end
|
||||
|
||||
return Managment
|
||||
return Banking
|
||||
@@ -1,19 +1,19 @@
|
||||
---@diagnostic disable: duplicate-set-field
|
||||
if GetResourceState('fd_banking') == 'missing' then return end
|
||||
Managment = Managment or {}
|
||||
Banking = Banking or {}
|
||||
|
||||
local fd_banking = exports['fd_banking']
|
||||
|
||||
---This will get the name of the Managment system being being used.
|
||||
---@return string
|
||||
Managment.GetManagmentName = function()
|
||||
Banking.GetManagmentName = function()
|
||||
return 'fd_banking'
|
||||
end
|
||||
|
||||
---This will return a number
|
||||
---@param account string
|
||||
---@return number
|
||||
Managment.GetAccountMoney = function(account)
|
||||
Banking.GetAccountMoney = function(account)
|
||||
return fd_banking:GetAccount(account)
|
||||
end
|
||||
|
||||
@@ -22,7 +22,7 @@ end
|
||||
---@param amount number
|
||||
---@param reason string
|
||||
---@return boolean
|
||||
Managment.AddAccountMoney = function(account, amount, reason)
|
||||
Banking.AddAccountMoney = function(account, amount, reason)
|
||||
return fd_banking:AddMoney(account, amount, reason)
|
||||
end
|
||||
|
||||
@@ -31,8 +31,8 @@ end
|
||||
---@param amount number
|
||||
---@param reason string
|
||||
---@return boolean
|
||||
Managment.RemoveAccountMoney = function(account, amount, reason)
|
||||
Banking.RemoveAccountMoney = function(account, amount, reason)
|
||||
return fd_banking:RemoveMoney(account, amount, reason)
|
||||
end
|
||||
|
||||
return Managment
|
||||
return Banking
|
||||
+6
-6
@@ -1,19 +1,19 @@
|
||||
---@diagnostic disable: duplicate-set-field
|
||||
if GetResourceState('kartik-banking') == 'missing' then return end
|
||||
Managment = Managment or {}
|
||||
Banking = Banking or {}
|
||||
|
||||
local kartik = exports['kartik-banking']
|
||||
|
||||
---This will get the name of the Managment system being being used.
|
||||
---@return string
|
||||
Managment.GetManagmentName = function()
|
||||
Banking.GetManagmentName = function()
|
||||
return 'kartik-banking'
|
||||
end
|
||||
|
||||
---This will return a number
|
||||
---@param account string
|
||||
---@return number
|
||||
Managment.GetAccountMoney = function(account)
|
||||
Banking.GetAccountMoney = function(account)
|
||||
local balance = kartik:GetAccountMoney(account)
|
||||
return balance or 0
|
||||
end
|
||||
@@ -23,7 +23,7 @@ end
|
||||
---@param amount number
|
||||
---@param reason string
|
||||
---@return boolean
|
||||
Managment.AddAccountMoney = function(account, amount, reason)
|
||||
Banking.AddAccountMoney = function(account, amount, reason)
|
||||
return kartik:AddAccountMoney(account, amount, reason)
|
||||
end
|
||||
|
||||
@@ -32,8 +32,8 @@ end
|
||||
---@param amount number
|
||||
---@param reason string
|
||||
---@return boolean
|
||||
Managment.RemoveAccountMoney = function(account, amount, reason)
|
||||
Banking.RemoveAccountMoney = function(account, amount, reason)
|
||||
return kartik:RemoveAccountMoney(account, amount, reason)
|
||||
end
|
||||
|
||||
return Managment
|
||||
return Banking
|
||||
@@ -1,19 +1,19 @@
|
||||
---@diagnostic disable: duplicate-set-field
|
||||
if GetResourceState('okokBanking') == 'missing' then return end
|
||||
Managment = Managment or {}
|
||||
Banking = Banking or {}
|
||||
|
||||
local okokBanking = exports['okokBanking']
|
||||
|
||||
---This will get the name of the Managment system being being used.
|
||||
---@return string
|
||||
Managment.GetManagmentName = function()
|
||||
Banking.GetManagmentName = function()
|
||||
return 'okokBanking'
|
||||
end
|
||||
|
||||
---This will return a number
|
||||
---@param account string
|
||||
---@return number
|
||||
Managment.GetAccountMoney = function(account)
|
||||
Banking.GetAccountMoney = function(account)
|
||||
return okokBanking:GetAccount(account)
|
||||
end
|
||||
|
||||
@@ -22,7 +22,7 @@ end
|
||||
---@param amount number
|
||||
---@param _ string
|
||||
---@return boolean
|
||||
Managment.AddAccountMoney = function(account, amount, _)
|
||||
Banking.AddAccountMoney = function(account, amount, _)
|
||||
return okokBanking:AddMoney(account, amount)
|
||||
end
|
||||
|
||||
@@ -31,8 +31,8 @@ end
|
||||
---@param amount number
|
||||
---@param _ string
|
||||
---@return boolean
|
||||
Managment.RemoveAccountMoney = function(account, amount, _)
|
||||
Banking.RemoveAccountMoney = function(account, amount, _)
|
||||
return okokBanking:RemoveMoney(account, amount)
|
||||
end
|
||||
|
||||
return Managment
|
||||
return Banking
|
||||
@@ -1,19 +1,19 @@
|
||||
---@diagnostic disable: duplicate-set-field
|
||||
if GetResourceState('qb-banking') == 'missing' then return end
|
||||
Managment = Managment or {}
|
||||
Banking = Banking or {}
|
||||
|
||||
local qbBanking = exports['qb-banking']
|
||||
|
||||
---This will get the name of the Managment system being being used.
|
||||
---@return string
|
||||
Managment.GetManagmentName = function()
|
||||
Banking.GetManagmentName = function()
|
||||
return 'qb-banking'
|
||||
end
|
||||
|
||||
---This will return a number
|
||||
---@param account string
|
||||
---@return number
|
||||
Managment.GetAccountMoney = function(account)
|
||||
Banking.GetAccountMoney = function(account)
|
||||
return qbBanking:GetAccountBalance(account)
|
||||
end
|
||||
|
||||
@@ -22,7 +22,7 @@ end
|
||||
---@param amount number
|
||||
---@param reason string
|
||||
---@return boolean
|
||||
Managment.AddAccountMoney = function(account, amount, reason)
|
||||
Banking.AddAccountMoney = function(account, amount, reason)
|
||||
return qbBanking:AddMoney(account, amount, reason)
|
||||
end
|
||||
|
||||
@@ -31,8 +31,8 @@ end
|
||||
---@param amount number
|
||||
---@param reason string
|
||||
---@return boolean
|
||||
Managment.RemoveAccountMoney = function(account, amount, reason)
|
||||
Banking.RemoveAccountMoney = function(account, amount, reason)
|
||||
return qbBanking:RemoveMoney(account, amount, reason)
|
||||
end
|
||||
|
||||
return Managment
|
||||
return Banking
|
||||
+6
-6
@@ -1,19 +1,19 @@
|
||||
---@diagnostic disable: duplicate-set-field
|
||||
if GetResourceState('Renewed-Banking') == 'missing' then return end
|
||||
Managment = Managment or {}
|
||||
Banking = Banking or {}
|
||||
|
||||
local renewed = exports['Renewed-Banking']
|
||||
|
||||
---This will get the name of the Managment system being being used.
|
||||
---@return string
|
||||
Managment.GetManagmentName = function()
|
||||
Banking.GetManagmentName = function()
|
||||
return 'Renewed-Banking'
|
||||
end
|
||||
|
||||
---This will return a number
|
||||
---@param account string
|
||||
---@return number
|
||||
Managment.GetAccountMoney = function(account)
|
||||
Banking.GetAccountMoney = function(account)
|
||||
return renewed:getAccountMoney(account)
|
||||
end
|
||||
|
||||
@@ -22,7 +22,7 @@ end
|
||||
---@param amount number
|
||||
---@param _ string
|
||||
---@return boolean
|
||||
Managment.AddAccountMoney = function(account, amount, _)
|
||||
Banking.AddAccountMoney = function(account, amount, _)
|
||||
return renewed:addAccountMoney(account, amount)
|
||||
end
|
||||
|
||||
@@ -31,8 +31,8 @@ end
|
||||
---@param amount number
|
||||
---@param _ string
|
||||
---@return boolean
|
||||
Managment.RemoveAccountMoney = function(account, amount, _)
|
||||
Banking.RemoveAccountMoney = function(account, amount, _)
|
||||
return renewed:removeAccountMoney(account, amount)
|
||||
end
|
||||
|
||||
return Managment
|
||||
return Banking
|
||||
@@ -1,19 +1,19 @@
|
||||
---@diagnostic disable: duplicate-set-field
|
||||
if GetResourceState('tgg-banking') == 'missing' then return end
|
||||
Managment = Managment or {}
|
||||
Banking = Banking or {}
|
||||
|
||||
local tgg = exports['tgg-banking']
|
||||
|
||||
---This will get the name of the Managment system being being used.
|
||||
---@return string
|
||||
Managment.GetManagmentName = function()
|
||||
Banking.GetManagmentName = function()
|
||||
return 'tgg-banking'
|
||||
end
|
||||
|
||||
---This will return a number
|
||||
---@param account string
|
||||
---@return number
|
||||
Managment.GetAccountMoney = function(account)
|
||||
Banking.GetAccountMoney = function(account)
|
||||
return tgg:GetSocietyAccountMoney(account) or 0
|
||||
end
|
||||
|
||||
@@ -22,7 +22,7 @@ end
|
||||
---@param amount number
|
||||
---@param _ string
|
||||
---@return boolean
|
||||
Managment.AddAccountMoney = function(account, amount, _)
|
||||
Banking.AddAccountMoney = function(account, amount, _)
|
||||
return tgg:AddSocietyMoney(account, amount)
|
||||
end
|
||||
|
||||
@@ -31,8 +31,8 @@ end
|
||||
---@param amount number
|
||||
---@param _ string
|
||||
---@return boolean
|
||||
Managment.RemoveAccountMoney = function(account, amount, _)
|
||||
Banking.RemoveAccountMoney = function(account, amount, _)
|
||||
return tgg:RemoveSocietyMoney(account, amount)
|
||||
end
|
||||
|
||||
return Managment
|
||||
return Banking
|
||||
@@ -1,19 +1,19 @@
|
||||
---@diagnostic disable: duplicate-set-field
|
||||
if GetResourceState('tgiann-bank') == 'missing' then return end
|
||||
Managment = Managment or {}
|
||||
Banking = Banking or {}
|
||||
|
||||
local tgiann = exports["tgiann-bank"]
|
||||
|
||||
---This will get the name of the Managment system being being used.
|
||||
---@return string
|
||||
Managment.GetManagmentName = function()
|
||||
Banking.GetManagmentName = function()
|
||||
return 'tgiann-bank'
|
||||
end
|
||||
|
||||
---This will return a number
|
||||
---@param account string
|
||||
---@return number
|
||||
Managment.GetAccountMoney = function(account)
|
||||
Banking.GetAccountMoney = function(account)
|
||||
return tgiann:GetJobAccountBalance(account)
|
||||
end
|
||||
|
||||
@@ -22,7 +22,7 @@ end
|
||||
---@param amount number
|
||||
---@param _ string
|
||||
---@return boolean
|
||||
Managment.AddAccountMoney = function(account, amount, _)
|
||||
Banking.AddAccountMoney = function(account, amount, _)
|
||||
return tgiann:AddJobMoney(account, amount)
|
||||
end
|
||||
|
||||
@@ -31,8 +31,8 @@ end
|
||||
---@param amount number
|
||||
---@param _ string
|
||||
---@return boolean
|
||||
Managment.RemoveAccountMoney = function(account, amount, _)
|
||||
Banking.RemoveAccountMoney = function(account, amount, _)
|
||||
return tgiann:RemoveJobMoney(account, amount)
|
||||
end
|
||||
|
||||
return Managment
|
||||
return Banking
|
||||
+6
-6
@@ -1,19 +1,19 @@
|
||||
---@diagnostic disable: duplicate-set-field
|
||||
if GetResourceState('wasabi_banking') == 'missing' then return end
|
||||
Managment = Managment or {}
|
||||
Banking = Banking or {}
|
||||
|
||||
local wasabi_banking = exports['wasabi_banking']
|
||||
|
||||
---This will get the name of the Managment system being being used.
|
||||
---@return string
|
||||
Managment.GetManagmentName = function()
|
||||
Banking.GetManagmentName = function()
|
||||
return 'wasabi_banking'
|
||||
end
|
||||
|
||||
---This will return a number
|
||||
---@param account string
|
||||
---@return number
|
||||
Managment.GetAccountMoney = function(account)
|
||||
Banking.GetAccountMoney = function(account)
|
||||
local balance = wasabi_banking:GetAccountBalance(account, 'society')
|
||||
return balance or 0
|
||||
end
|
||||
@@ -23,7 +23,7 @@ end
|
||||
---@param amount number
|
||||
---@param reason string
|
||||
---@return boolean
|
||||
Managment.AddAccountMoney = function(account, amount, reason)
|
||||
Banking.AddAccountMoney = function(account, amount, reason)
|
||||
return wasabi_banking:AddMoney('society', account, amount)
|
||||
end
|
||||
|
||||
@@ -32,8 +32,8 @@ end
|
||||
---@param amount number
|
||||
---@param reason string
|
||||
---@return boolean
|
||||
Managment.RemoveAccountMoney = function(account, amount, reason)
|
||||
Banking.RemoveAccountMoney = function(account, amount, reason)
|
||||
return wasabi_banking:RemoveMoney('society', account, amount)
|
||||
end
|
||||
|
||||
return Managment
|
||||
return Banking
|
||||
@@ -66,7 +66,6 @@ function Dialogue.Open( name, dialogue, characterOptions, dialogueOptions, onSel
|
||||
SetCamCoord(cam, endLocation.x, endLocation.y, endLocation.z)
|
||||
RenderScriptCams(true, true, 1000, true, false)
|
||||
SetCamActive(cam, true)
|
||||
|
||||
end
|
||||
SendNUIMessage({
|
||||
type = "open",
|
||||
|
||||
Reference in new issue
Block a user