Client

Framework Bridge

This module provides a unified client-side API for working with ESX, QBCore, and QBox frameworks. The framework is detected automatically at runtime.

Supported frameworks:

  • esx

  • qbcore

  • qbox

If no supported framework is detected, all functions return safe defaults.


getFramework

fjsf.getFramework()

Returns the name of the detected framework.


Returns

  • string | nil

    • esx

    • qbcore

    • qbox

    • nil if no framework is detected


Example


getCore

Returns the core object of the detected framework.


Returns

  • table | nil Framework core object, or nil if not detected.


Example


isFrameworkDetected

Checks whether a supported framework was detected.


Returns

  • boolean

    • true – Framework detected

    • false – No framework detected


Example


isPlayerLoaded

Checks whether the player is fully loaded.

This uses framework-specific player load and unload events.


Returns

  • boolean

    • true – Player is loaded

    • false – Player is not loaded


Example


getJob

Returns the player’s current job.

Works across ESX, QBCore, and QBox.


Returns

  • table | nil Player job object, or nil if unavailable.


Example


getJobGrade

Returns the player’s job grade level.

Automatically adapts to framework-specific job structures.


Returns

  • number Job grade level. Returns 0 if unavailable.


Example


hasJob

Checks whether the player has a specific job.


Parameters

  • jobs string | table Job definition(s).

    Supported formats:

    • string Exact job name.

    • array List of allowed job names.

    • table Job name mapped to minimum required grade.


Returns

  • boolean

    • true – Player matches the job condition

    • false – Does not match


Examples

Single job

Multiple jobs

Job with minimum grade


isPlayerDead

Checks whether the player is dead or in last stand.

Automatically adapts to framework-specific metadata.


Returns

  • boolean

    • true – Player is dead or in last stand

    • false – Player is alive


Example


hasLicense

Checks whether the player owns a specific license.

This function uses a server callback internally.


Parameters

  • license string License name.


Returns

  • boolean

    • true – Player has the license

    • false – Player does not have the license


Example

Last updated