Server

Framework Bridge

This module provides a unified server-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 detected framework name.


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 unavailable.


Example


isFrameworkDetected

Checks whether a supported framework was detected.


Returns

  • boolean


Example


getName

Returns the player’s full character name.


Parameters

  • source number Player server ID.


Returns

  • string | nil


Example


getIdentifier

Returns the player’s unique identifier.


Parameters

  • source number Player server ID.


Returns

  • string | nil


Example


getJob

Returns the player’s job object.


Parameters

  • source number Player server ID.


Returns

  • table | nil


Example


getJobGrade

Returns the player’s job grade level.


Parameters

  • source number Player server ID.


Returns

  • number Returns 0 if unavailable.


Example


hasJob

Checks whether the player matches a job condition.


Parameters

  • source number Player server ID.

  • jobs string | table Job definition(s).

    Supported formats:

    • string – exact job name

    • array – list of job names

    • table – { jobName = minimumGrade }


Returns

  • boolean


Examples


getPermission

Returns the player’s permission group.


Parameters

  • source number Player server ID.


Returns

  • string Permission name (default: user).


Example


hasPermission

Checks whether the player belongs to a permission group.


Parameters

  • source number

  • perms string | table


Returns

  • boolean


Example


hasAcePermission

Checks whether the player has an ACE permission.


Parameters

  • source number

  • ace string | table


Returns

  • boolean


Example


hasMoney

Checks whether the player has enough money.


Parameters

  • source number

  • amount number

  • account string | nil

    • cash

    • bank

    • money (auto-normalized)


Returns

  • boolean


Example


addMoney

Adds money to a player account.


Parameters

  • source number

  • amount number

  • account string | nil


Returns

  • boolean


Example


removeMoney

Removes money from a player account.


Parameters

  • source number

  • amount number

  • account string | nil


Returns

  • boolean


Example


hasItem

Checks whether the player has an item.


Parameters

  • source number

  • item string

  • amount number | nil


Returns

  • boolean


Example


addItem

Adds an item to the player inventory.


Parameters

  • source number

  • item string

  • amount number | nil

  • metadata table | nil


Returns

  • boolean


Example


removeItem

Removes an item from the player inventory.


Parameters

  • source number

  • item string

  • amount number | nil

  • slot number | nil

  • metadata table | nil


Returns

  • boolean


Example


hasLicense

Checks whether the player owns a license.


Parameters

  • source number

  • license string


Returns

  • boolean


Example

Last updated