JRS COREالوثائق

Setup

Install gumApi, choose the framework and set the language

Note
هذه الصفحة غير مترجمة بعد. يتم عرض النسخة الإنجليزية.

1. Name the folder gumApi#

The folder must be called gumApi. The NUI sends its answers to the resource with that name, so a renamed folder makes inputs and yes/no questions stop responding.

2. Check config.lua#

Keep Config.Auto = true to detect the running core. Supported cores are gum_core, rsg-core and jrs_core. The bridge and the inventory icon folder are selected for you.

For a custom or renamed core set Config.Auto = false and choose Config.Framework by hand.

3. Start order in server.cfg#

Start the core and its inventory first, then gumApi, then the scripts that use it.

ensure jrs_core
ensure jrs_inventory
ensure gumApi
ensure gum_stables
Warning

Auto detection runs once when the resource starts. If no core, or more than one core, is running, gumApi stops with an error instead of guessing a bridge.

Configuration#

lua
Config.EyeKey = nil            -- nil = disabled
Config.EyeCommand = "target"   -- command that toggles eye targeting
Config.EyePromptOnly = false   -- prompts react only while eye targeting is open

Config.NewPrompts = {
    enabled = true,
    right = 2.2, bottom = 3.5, -- distance from the screen edges, in percent
    scale = 1.0,               -- size multiplier (Full HD is shown at 75 percent automatically)
    blockGameControls = true,  -- block the matching game action while a prompt is visible
    blockAllControls = false,  -- true freezes all controls while any new prompt is visible
    hideWhileNuiFocused = true,
    hideWhilePaused = true,
    hideWhileDead = true,
    debug = false
}

Config.Auto = true
Config.Framework = "GUM"       -- GUM, RSG, JRS, CUSTOM
Framework Icon folder used by notifications
JRS jrs_inventory/html/images/items/
GUM gum_inventory/html/images/items/
RSG rsg-inventory/html/images/

Language#

All shared texts live in configLanguage.lua (save it as UTF-8):

  • Config.Language.ui holds the Accept, Cancel, Yes, No, Finish texts, the input placeholder and the label of the prompt area.
  • Config.Language.prompts holds the messages of the new prompt system. Empty keys fall back to English.
  • Config.Language[1] to [6] are the Discord embed labels (player, character, character id, steam, name, surname).
Note

Action labels sent by other resources are translated in those resources, not here.

CUSTOM framework#

The configuration comment mentions serverData/serverCompCustom.lua, but that file is not part of the package and is not listed in fxmanifest.lua. For a custom core copy serverCompJRS.lua, rename it, change the Config.Framework check at the top and add it to server_scripts.