All resources

rsg-gangmenu – Docs (v3.0.1)#

Contents#

  1. Files
  2. How it works
  3. Configuration
  4. Exports, events and commands
  5. Database
  6. Security
  7. Server owner how-tos
  8. Troubleshooting

1. Files#

FilePurpose
fxmanifest.luaManifest; depends on rsg-core, oxmysql, rsg-inventory; exports AddGangMoney, RemoveGangMoney, GetGangAccount
shared/config.luaLocations, keybind, limits
client/client.luaPrompts, blips, NUI bridge, /gangmenu
server/server.luaMembers, hire/fire/grade, stash, gang bank, /removegang
server/versionchecker.luaGitHub version check
html/NUI (index.html, style.css, script.js)
locales/*.jsonen, cs, de, el, es, fr, it, pl, pt-br

2. How it works#

  • Gang bosses manage members (online and offline), promote/demote, and fire with confirmation.
  • Recruiting: nearby players must accept an invite.
  • Shared gang stash through rsg-inventory, named gang_<name>.
  • Gang bank in management_funds (type gang): deposit and withdraw cash.
  • /gangmenu opens member management and hiring from anywhere; stash and money stay locked to the gang location.
  • Optional blips, shown to everyone or only to gang members.

3. Configuration#

shared/config.lua:

OptionDefaultMeaning
BliptableSprite and scale
Keybind'J'Open key
StorageMaxWeight / StorageMaxSlots4000000 / 50Stash size
InteractDistance5.0Server-side max distance to use stash/money
HireDistance10.0Max boss-to-recruit distance
MaxTransaction1000000Max single deposit/withdraw
GangLocationslist{ id, name, blipname, coords, showblip, blipforall }

id must match the gang name in your gangs data (rsg-core/shared/gangs.lua).

4. Exports, events and commands#

NameSideNotes
GetGangAccount(account)server exportGang balance
AddGangMoney(account, amount)server exportAdd to a gang account
RemoveGangMoney(account, amount)server exportRemove from a gang account
rsg-gangmenu:client:mainmenuclient eventOpen the menu
rsg-gangmenu:server:openinventoryserver eventOpen the gang stash
rsg-gangmenu:server:withdrawMoney / depositMoneyserver events(amount)
rsg-gangmenu:server:GetAccountcallbackGang balance
rsg-gangmenu:server:GetEmployeescallbackMember list
rsg-gangmenu:server:GradeUpdateserver event(data)
rsg-gangmenu:server:FireMemberserver event(citizenid)
rsg-gangmenu:server:HireMemberserver event(recruit)
rsg-gangmenu:server:GetNearbyPlayerscallbackRecruit candidates
CommandWhoWhat
/gangmenugang bossManage members and hire from anywhere
/removegang [id]adminRemove a player from their gang

5. Database#

Uses management_funds (job_name, amount, type), created by the rsg-core SQL; this resource uses rows with type = 'gang'.

6. Security#

Every action re-checks boss status and the real gang on the server. Stash and gang names are never taken from the client. Stash and money need proximity to that gang's location. Amounts are sanitised, capped and rate limited. Promote/fire only within your gang and not above your grade. Hire re-checks distance before and after the invite. Optional logging through rsg-log.

7. How-tos#

  • Add a gang: add it to your gangs data, then add a GangLocations entry with the same id.
  • Language: setr rsg:locale "de" in server.cfg.

8. Troubleshooting#

ProblemFix
No promptThe gang name must match id and the player must be a boss grade
Placeholder gang1 at 0,0,0Replace the example location in GangLocations
Stash won't openStand within InteractDistance of the location

Support the Project : https://rexshack.tebex.store/

<!-- BEGIN AUTO-REFERENCE (generated from the code; re-run the generator instead of editing by hand) -->

Technical reference#

Generated from the source of rsg-gangmenu 3.0.1. Names, arguments and defaults below are read straight from the code.

Dependencies#

rsg-core, oxmysql, rsg-inventory

Configuration#

OptionDefaultNotes
Config.Bliptableblip settings
Config.Keybind'J'settings
Config.StorageMaxWeight4000000
Config.StorageMaxSlots50
Config.InteractDistance5.0server-side max distance from a gang location to use stash / money
Config.HireDistance10.0max distance between boss and recruit
Config.MaxTransaction1000000max single deposit / withdraw
Config.GangLocationstableid must match the gang name in rsg-core/shared/gangs.lua

Callbacks#

CallbackSideArgumentsFile
rsg-gangmenu:client:ConfirmInviteclientcb, gangLabelclient/client.lua
rsg-gangmenu:server:GetAccountserversource, cbserver/server.lua
rsg-gangmenu:server:GetEmployeesserversource, cbserver/server.lua
rsg-gangmenu:server:GetNearbyPlayersserversource, cbserver/server.lua
-- client side
RSGCore.Functions.TriggerCallback('rsg-gangmenu:client:ConfirmInvite', function(result)
    -- use result
end)

Events#

Server events can be fired by any client, so every handler re-validates the player, the arguments and any permission, distance or cooldown on the server. Never add a reward to a handler without those checks.

EventSideArgumentsFile
RSGCore:Client:OnPlayerLoadedclient``client/client.lua
RSGCore:Client:OnPlayerUnloadclient``client/client.lua
RSGCore:Client:OnGangUpdateclientgangInfoclient/client.lua
rsg-gangmenu:client:mainmenuclient``client/client.lua
rsg-gangmenu:server:openinventoryserver``server/server.lua
rsg-gangmenu:server:withdrawMoneyserveramountserver/server.lua
rsg-gangmenu:server:depositMoneyserveramountserver/server.lua
rsg-gangmenu:server:GradeUpdateserverdataserver/server.lua
rsg-gangmenu:server:FireMemberservercitizenidserver/server.lua
rsg-gangmenu:server:HireMemberserverrecruitserver/server.lua
-- from a client script
TriggerServerEvent('rsg-gangmenu:server:openinventory')
-- from a server script
TriggerClientEvent('RSGCore:Client:OnPlayerLoaded', source)

Commands#

CommandNotesFile
/gangmenuclient/client.lua
/removeganglocale('sv_admin_usage')server/server.lua

Locales#

Language files in locales/: cs, de, el, en, es, fr, it, ja, nl, pl, pt-br, ro, ru. Set the language with setr rsg:locale "en".

<!-- END AUTO-REFERENCE -->