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
  • get_current_time
  • debug_log
  • get
  • wait_for
  • inject_locale
  1. FIVEM FREE RESOURCES
  2. BDSC
  3. API
  4. Functions

Shared

Technical reference only.

See the Guides for usage examples and system flow.

get_current_time

Returns the current timestamp as a formatted string.

bdsc.get_current_time()

Returns

  • string: Formatted time (YYYY-MM-DD HH:MM:SS)


debug_log

Prints a formatted debug message to the console.

bdsc.debug_log(level, section, key, ...)

Parameters

  • level string: One of "debug", "info", "success", "warn", "error", "critical", "dev"

  • section string: The locale section to pull the message from

  • key string: The message key in the locale or a raw string

  • ... any: Format arguments to inject into the message


get

Loads and caches a module file from the BDSC resource.

local Player = bdsc.get("core.player.factory")

Parameters

  • path string: Dotted path to the module (e.g., "core.player.factory")

Returns

  • table|nil: The loaded module table or nil if not found/errored


wait_for

Waits until a given function returns true or a timeout is reached.

bdsc.wait_for(function() return condition end, 5)

Parameters

  • fn function: The condition function to evaluate

  • timeout number|nil: Time to wait in seconds (default 5)

  • interval number|nil: Check interval in ms (default 100)

Returns

  • boolean: True if condition met, false if timed out


inject_locale

Injects locale entries into the language map.

bdsc.inject_locale("info", { hello = "Hello, %s!" })

Parameters

  • section string: Locale category (e.g., "info", "error")

  • entries table: Key-value map of translations

Last updated 1 day ago