Plugin Structure
Each plugin in BDSC lives in its own directory under /plugins
.
There are no strict requirements on what folders a plugin must have.
However, player extensions must follow a specific structure.
Folder Layout
All folders are technically optional depending on what your plugin does.
Only the player/
folder, if present, must include both factory.lua
and class.lua
exactly.
Loading Behaviour
server/
, client/
, and shared/
scripts are loaded automatically using:
Load order is not enforced for context specific folders — use bdsc.get()
to load specific modules or enforce dependencies cleanly.
init.lua
is treated as a shared plugin entry point and is always loaded.
Use it to register hooks, handle setup logic, and separate behaviour with bdsc.is_server
.
This will become a mandatory entry point for plugin registration as the system evolves.
UI Handling
If your plugin uses a UI:
Place UI assets in the
/ui
folder inside your pluginDo not include your own
index.html
BDSC uses a shared root
index.html
to support FiveM’s single-page UI limitation
You must declare your UI files in the plugin’s manifest.json
.
These are dynamically injected into the main UI shell.
See: Plugin UI
Player Extensions
When extending the player object:
You must create a
player/
folderYou must include:
factory.lua
: Returns the constructor logic for the extensionclass.lua
: Defines methods that attach to the player instance
This enforced structure allows the core to automatically load and bind player extensions during creation.
See: Extending the Player Object
Last updated