Documentation
TebexDiscordYouTubeGitHub
  • Introduction
  • FIVEM FREE RESOURCES
    • BDSC
      • Guides
        • Core Setup
          • Installing BDSC
          • Configuring BDSC
        • Plugin Development
          • What is a Plugin?
          • Plugin Structure
          • Extending Player Objects
      • API
        • Functions
          • Player
          • Server
          • Client
          • Shared
        • Modules
          • Player Manager
          • Buckets
          • Plugins
        • UI Components
    • boii_utils
      • Installation
      • Configuration
      • Modules
      • API
        • Callbacks
        • Characters
        • Commands
        • Cooldowns
        • Debugging
        • Entities
        • Environment
        • Framework Bridge
        • Geometry
        • Items
        • Keys
        • Licences
        • Maths
        • Methods
        • Player
        • Requests
        • Strings
        • Tables
        • Timestamps
        • UI Bridges
        • Vehicles
        • Version
        • XP
        • UI Elements
  • FIVEM PAID RESOURCES
    • Page 2
Powered by GitBook
On this page
  • register
  • run
  • has_executed
  • clear
  1. FIVEM FREE RESOURCES
  2. BDSC
  3. API
  4. Modules

Plugins

Technical reference only.

See the Guides for usage examples and system flow.

Handles external plugin hook registration and execution. Used by internal systems and plugins to hook into the player object lifecycle and inject behaviours.

The plugins module is only required for extending or modifying the player object during its lifecycle. Internal systems and external plugins use it to inject custom behaviour during player initialization (e.g., adding extensions, methods, or syncing data).


register

Registers a plugin hook function to run during player initialization.

plugins.register(name, fn, priority)

Parameters

  • name (string): Unique name for the plugin.

  • fn (function): Function to execute.

  • priority (number|nil): Optional loading priority. Lower values run earlier.


run

Executes all registered plugin hooks for a given player object.

plugins.run(player)

Parameters

  • player (table): The player object to pass into each hook.


has_executed

Checks if a specific plugin hook has already run.

plugins.has_executed(name)

Parameters

  • name (string): The plugin name to check.

Returns

  • boolean: True if the plugin has been executed.


clear

Clears all registered hooks and their execution state.

plugins.clear()

Description

Resets the hook system, removing all previously registered hooks and clearing execution records.

Last updated 1 day ago