RDE_ORGANIZATIONS DOCS
RED DRAGON ELITE // PLAYER SYSTEMS

Unlimited Ranks.
27 Permission Flags. Free.

rde_organizations is one system for every faction on your server — legal businesses, criminal syndicates, gangs, MCs, corporations, government departments — each with unlimited custom ranks, per-member permission overrides, a full bank with audit log, and a realtime admin panel. Pair with rde_crew and gang-type orgs automatically become territory-holding crews.

01 / Start Here

Overview

A player can be in up to 5 organizations simultaneously. Each org has unlimited custom ranks, and each rank has up to 27 granular permission flags. Individual members can receive custom permission overrides on top of their rank. Every change publishes immediately to a prefixed statebag — no polling, no callback chains.

Core Principle GlobalState['rde_orgs_<identifier>'] holds a player's full org memberships, ranks, and effective permissions as a single array — any resource reads it directly, zero callback roundtrip.

Why this over typical job/gang scripts

Typical Job/Gang Scriptsrde_organizations
Fixed 4 grades: Rookie/Officer/Boss/OwnerUnlimited custom ranks
Permissions hardcoded per grade27 permission flags individually toggled per rank
One org type: "job"8 org types with distinct default templates
Org management: /setjob id rankRealtime NUI panel — invite, promote, salary, all in-game
Gang scripts don't know jobs existOrgBridge — gang orgs ARE territory crews in rde_crew, automatically
02 / Start Here

Quick Start

server.cfg
ensure oxmysql
ensure ox_lib
ensure ox_core
ensure ox_target
ensure rde_organizations
ensure rde_crew        -- after rde_organizations if using OrgBridge

All four tables auto-create on first start. Open the org panel via the boss terminal NPC or /org.

03 / Reference

Org Types

TypeDefault Use
gangTerritorial street crews — pairs with rde_crew OrgBridge
mcMC hierarchy (Prospect → VP → President)
criminalUnderground syndicates, mafias, cartels
legalLaw firms, shops, taxi companies
corpMegacorps, PMCs, hedge funds
govPolice, EMS, city council

Each type ships a default rank template applied at creation — all ranks are fully editable, renamable, and deletable (except the leader rank) afterward.

04 / Reference

Permission System

27 flags grouped into six categories, individually toggled per rank, overridable per member:

CategoryFlags
Membersinvite · kick · promote · demote · set_salary · view_members
Bankbank_deposit · bank_withdraw · bank_view · send_salary
Ranksmanage_ranks · assign_ranks
Settingsedit_org · manage_blip · manage_terminal
High Clearancetransfer_leader · disband
Territory (OrgBridge)spray_territory · declare_war
Per-member overrides Individual members can have specific permissions granted or restricted on top of their rank — a Captain who shouldn't have withdraw access, or a Rookie trusted with invite rights.
05 / Reference

OrgBridge — rde_crew Territory Integration

When both resources are installed and the bridge is enabled on the rde_crew side, gang-type orgs become territory-holding crews automatically. rde_organizations fires server-side events at every mutation point — orgCreated, orgDisbanded, memberAdded, memberRankChanged, leaderTransferred, and more — which rde_crew listens to. Neither resource imports or calls the other directly.

Setup Install rde_crew v2.0.1+, ensure rde_organizations starts before rde_crew in server.cfg, and set Config.OrgBridge.enabled = true in rde_crew's config. No further configuration needed.
06 / Reference

Security

Permission enforcement is server-authoritative — HasPerm() checked before every mutation
Permission escalation blocked — a rank editor cannot grant permissions it doesn't itself hold
Leader rank cannot be deleted or demoted via the standard rank flow
Invite expiry enforced server-side at acceptance time
07 / More

Common Pitfalls

rank_id / rankId field mismatch

Raw MySQL rows from rde_org_members use snake_case (rank_id), but statebag builders read camelCase (rankId). The mismatch caused a nil rank for all members, silently breaking permission checks.

Fix (v2.0.2): normalized m.rankId = m.rank_id once in LoadMembers() — every downstream read now works regardless of field name.

OrgBridge: crew not appearing after org creation

Usually a start-order issue.

Fix: confirm rde_organizations starts before rde_crew, and the org type is in Config.OrgBridge.crewOrgTypes on the rde_crew side.

08 / More

FAQ

How many orgs can one player join?

Up to 5 simultaneously by default — configurable via Config.MaxOrgsPerPlayer.

Is rde_crew required?

No — it's entirely optional. Without it, rde_organizations runs as a standalone multi-org system.

09 / More

Changelog

v2.0.3

OrgBridge outbound events at every mutation point, territory permissions (spray_territory, declare_war).

v2.0.2

Fixed rank_id/rankId normalization bug that silently broke permission checks for all members.

v2.0.1

Unlimited custom ranks (up from 4 hardcoded), 25 permission flags, per-member overrides, 8 org types.