Skip to content

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:

PartDefault
Player idthe player's license
JobsACE: add_ace group.police gsd.job.police allow, boss: gsd.job.<job>.boss, duty: state.gsdDuty
Money, inventory, bank, societyturned off
UI and notificationsox_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.lua
  • client/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)
end

Rules ​

  1. Keep every function name, its parameters and its return type. Only change what is inside.

  2. When you connected a part, turn on its capability at the top of the server file:

    lua
    GSD.Capabilities.money = true
    GSD.Capabilities.inventory = true

    Capabilities: money, inventory, jobs, bank, society, ui.

  3. Functions you do not touch keep a safe default.

  4. Tell the bridge when a character is loaded, so scripts can start for that player:

    lua
    AddEventHandler('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.

Red Dead Redemption 2 belongs to Rockstar Games. Gunsmoke Development is not connected to Rockstar Games.