Custom core
Running your own framework? GSD Bridge has a custom adapter: two files you connect to your core. After that every GSD script runs on your server.
Turn it on
Set Config.Framework = 'custom' in gsd-bridge/config.lua (or simply run without vorp_core / rsg-core).
Works out of the box
Even before you change anything, the custom adapter already runs:
| Part | Default |
|---|---|
| Player id | the player's license |
| Jobs | ACE: add_ace group.police gsd.job.police allow, boss: gsd.job.<job>.boss, duty: state.gsdDuty |
| Money, inventory, bank, society | turned off |
| UI and notifications | ox_lib if it runs, otherwise the GSD UI |
Scripts check what is available, so a script that needs money simply turns that part off (or makes it free) until you connect it.
The two files
server/frameworks/custom.luaclient/frameworks/custom.lua
Every function in them has a short description of its parameters and return value, and an -- EXAMPLE: line:
lua
---@param src number
---@param moneyType string 'cash' | 'gold' | 'rol' | 'bloodmoney' | 'bank'
---@return number
Api.GetMoney = function(src, moneyType)
-- EXAMPLE: return exports['my_core']:GetMoney(src, moneyType)
endRules
Keep every function name, its parameters and its return type. Only change what is inside.
When you connected a part, turn on its capability at the top of the server file:
luaGSD.Capabilities.money = true GSD.Capabilities.inventory = trueCapabilities:
money,inventory,jobs,bank,society,ui.Functions you do not touch keep a safe default.
Tell the bridge when a character is loaded, so scripts can start for that player:
luaAddEventHandler('my_core:characterLoaded', function(src) GSD.EmitLoaded(src) end)
Hunger and thirst
For another HUD (for example bln_hud): set Config.Needs = 'custom' and fill in Needs.custom in server/modules/needs.lua.
Updates
We never remove or rename a bridge function - new versions only add new ones. Your edited custom files keep working after an update: just keep your two files when you replace the rest.