πŸš€framework bridge

Overview

The script uses an editable bridge system to support any framework. All framework-specific functions are located in two files:

  • modules/editable_client.lua - Client-side functions

  • modules/editable_server.lua - Server-side functions

Client-Side Bridge

File: modules/editable_client.lua

ESX (Default)

Editable = Editable or {}

function Editable.GetPlayerGroup()
    local xPlayer = ESX.GetPlayerData()
    if xPlayer then
        return xPlayer.job and xPlayer.job.grade_name or 'user'
    end
    return 'user'
end

function Editable.ShowNotification(message)
    ESX.ShowNotification(message)
end

function Editable.GetPlayerName()
    local xPlayer = ESX.GetPlayerData()
    if xPlayer then
        return xPlayer.name or GetPlayerName(PlayerId())
    end
    return GetPlayerName(PlayerId())
end

QB-Core

OX Core

Standalone

Server-Side Bridge

File: modules/editable_server.lua

ESX (Default)

QB-Core

OX Core

Standalone

Function Reference

Client Functions

Function
Description
Returns

Editable.GetPlayerGroup()

Get current player's group/rank

string

Editable.ShowNotification(message)

Display notification to player

void

Editable.GetPlayerName()

Get current player's character name

string

Server Functions

Function
Description
Returns

Editable.GetPlayerGroup(playerId)

Get player's group/rank

string

Editable.IsPlayerInGroup(playerId, groups)

Check if player is in any of the groups

boolean

Editable.GetPlayerName(playerId)

Get player's character name

string

Editable.ShowNotification(playerId, message)

Send notification to player

void

Group System

The group system is used for:

1

Command Restrictions

Limiting commands to specific groups.

2

Name Colors

Different colors for different groups.

3

Report Routing

Sending reports to admin groups.

Example Group Colors

Modifying fxmanifest.lua

If you change from ESX to another framework, update fxmanifest.lua:

ESX (Default)

QB-Core

OX Core

Standalone

Next Steps

Last updated