142 lines
3.9 KiB
Markdown
142 lines
3.9 KiB
Markdown
---
|
|
title: Bridge Integrations
|
|
description: A collection of code snippets and integration instructions to tie ngd-Bridge to other 3rd party scripts.
|
|
published: true
|
|
date: 2025-08-02T03:12:24.945Z
|
|
tags:
|
|
editor: markdown
|
|
dateCreated: 2025-08-02T02:50:46.766Z
|
|
---
|
|
|
|
<div align="center">
|
|
<img src="/11f39c35-0150-4b61-b168-a61c673b9cce.png" alt="NGD Logo">
|
|
|
|
</div>
|
|
|
|
|
|
## Banking Scripts
|
|
|
|
<details>
|
|
<summary><strong>Renewed-Banking</strong> (Click to Expand)</summary>
|
|
|
|
---
|
|
## Renewed-Banking Integration
|
|
|
|
> You'll be replacing the following functions with these blocks inside of `ngd-Bridge/framework/your_framework/server.lua`.
|
|
|
|
```lua
|
|
Framework.SocietyGetMoney = function(name, type)
|
|
if type ~= 'job' and type ~= 'gang' then error('Society Type Must Be Job Or Gang', 0) return 0 end
|
|
if type == "job" then
|
|
return exports['Renewed-Banking']:getAccountMoney(name)
|
|
elseif type == "gang" then
|
|
return exports['Renewed-Banking']:getAccountMoney(name)
|
|
end
|
|
return 0
|
|
end
|
|
```
|
|
|
|
```lua
|
|
Framework.SocietyAddMoney = function(name, type, amount)
|
|
if type ~= 'job' and type ~= 'gang' then error('Society Type Must Be Job Or Gang', 0) return false end
|
|
if amount < 0 or amount == 0 then return false end
|
|
if type == "job" then
|
|
exports['Renewed-Banking']:addAccountMoney(name, amount)
|
|
return true
|
|
elseif type == "gang" then
|
|
exports['Renewed-Banking']:addAccountMoney(name, amount)
|
|
return true
|
|
end
|
|
return false
|
|
end
|
|
```
|
|
|
|
```lua
|
|
Framework.SocietyRemoveMoney = function(name, type, amount)
|
|
if type ~= 'job' and type ~= 'gang' then error('Society Type Must Be Job Or Gang', 0) return false end
|
|
|
|
if type == "job" then
|
|
return exports['Renewed-Banking']:removeAccountMoney(name, amount)
|
|
elseif type == "gang" then
|
|
return exports['Renewed-Banking']:removeAccountMoney(name, amount)
|
|
end
|
|
return false
|
|
end
|
|
```
|
|
|
|
</details>
|
|
|
|
<details>
|
|
<summary><strong>OkOkBanking</strong> (Click to Expand)</summary>
|
|
|
|
---
|
|
## OkOkBanking Integration
|
|
|
|
> You'll be replacing the following functions with these blocks inside of `ngd-Bridge/framework/your_framework/server.lua`.
|
|
|
|
```lua
|
|
Framework.SocietyGetMoney = function(name, type)
|
|
if type ~= 'job' and type ~= 'gang' then error('Society Type Must Be Job Or Gang', 0) return 0 end
|
|
|
|
IsQBBanking, QBBanking = pcall(function()
|
|
return exports['okokBanking']:GetAccount(name)
|
|
end)
|
|
|
|
if IsQBBanking then return QBBanking end
|
|
|
|
if type == "job" then
|
|
return exports['okokBanking']:GetAccount(name)
|
|
elseif type == "gang" then
|
|
return exports['okokBanking']:GetAccount(name)
|
|
end
|
|
return 0
|
|
end
|
|
```
|
|
|
|
```lua
|
|
Framework.SocietyAddMoney = function(name, type, amount)
|
|
if type ~= 'job' and type ~= 'gang' then error('Society Type Must Be Job Or Gang', 0) return false end
|
|
if amount < 0 or amount == 0 then return false end
|
|
|
|
IsQBBanking, QBBanking = pcall(function()
|
|
return exports['okokBanking']:AddMoney(name, amount)
|
|
end)
|
|
|
|
if IsQBBanking then return QBBanking end
|
|
|
|
if type == "job" then
|
|
exports['okokBanking']:AddMoney(name, amount)
|
|
return true
|
|
elseif type == "gang" then
|
|
exports['okokBanking']:AddMoney(name, amount)
|
|
return true
|
|
end
|
|
return false
|
|
end
|
|
```
|
|
|
|
```lua
|
|
Framework.SocietyRemoveMoney = function(name, type, amount)
|
|
if type ~= 'job' and type ~= 'gang' then error('Society Type Must Be Job Or Gang', 0) return false end
|
|
|
|
IsQBBanking, QBBanking = pcall(function()
|
|
return exports['okokBanking']:RemoveMoney(name, amount)
|
|
end)
|
|
|
|
if IsQBBanking then return QBBanking end
|
|
|
|
if type == "job" then
|
|
return exports['okokBanking']:RemoveMoney(name, amount)
|
|
elseif type == "gang" then
|
|
return exports['okokBanking']:RemoveMoney(name, amount)
|
|
end
|
|
return false
|
|
end
|
|
```
|
|
|
|
</details>
|
|
|
|
> Do you still need help? Open a ticket in our [Discord](https://discord.gg/AnXx2GVGcM)
|
|
{.is-warning}
|
|
|