ngddocs/Integrations.md

3.9 KiB

title description published date tags editor dateCreated
Bridge Integrations A collection of code snippets and integration instructions to tie ngd-Bridge to other 3rd party scripts. true 2025-08-02T03:12:24.945Z markdown 2025-08-02T02:50:46.766Z
NGD Logo

Banking Scripts

Renewed-Banking (Click to Expand)

Renewed-Banking Integration

You'll be replacing the following functions with these blocks inside of ngd-Bridge/framework/your_framework/server.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
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
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 
OkOkBanking (Click to Expand)

OkOkBanking Integration

You'll be replacing the following functions with these blocks inside of ngd-Bridge/framework/your_framework/server.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
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
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

Do you still need help? Open a ticket in our Discord {.is-warning}