Client
Framework (client). Local player helpers. Identity, jobs, money, metadata, commands, and item use live on server. Shared types: Framework.
Framework (client)
Local player helpers. Identity, jobs, money, metadata, commands, and item use live on server. Shared types: Framework.
getStress()
local stress = bridge.framework.getStress()| Returns | number — local player stress level |
getHunger()
local hunger = bridge.framework.getHunger()| Returns | number — local player hunger |
getThirst()
local thirst = bridge.framework.getThirst()| Returns | number — local player thirst |
setStatus(statusType, value)
bridge.framework.setStatus('stress', 0)| Param | Type | Description |
|---|---|---|
statusType | string | 'stress', 'hunger', or 'thirst' |
value | number | New status value |
isOnDuty()
if bridge.framework.isOnDuty() then end| Returns | boolean — whether the local player is on duty |
hasJob(job, grade?, duty?)
hasJob(job, grade, duty)| Param | Type | Description |
|---|---|---|
job | string | Job name |
grade | number? | Minimum grade |
duty | boolean? | Require on-duty |
| Returns | boolean |
Usage Example
if bridge.framework.hasJob('police', 2, true) then
bridge.notifications.notify({ description = 'On duty as Sergeant', type = 'inform' })
endgetPlayerJobData()
getPlayerJobData()| Returns | PlayerJobData? |
Usage Example
local job = bridge.framework.getPlayerJobData()
if job then print(job.jobName, job.grade) endgetPlayerData()
local data = bridge.framework.getPlayerData()| Returns | table? — live framework player data |
getPlayerMetadata(key)
local licenses = bridge.framework.getPlayerMetadata('licenses')| Param | Type | Description |
|---|---|---|
key | string | Metadata key (e.g. 'stress', 'hunger') |
| Returns | any |
hasGroup(group, grade?, duty?)
Job or gang group from the client cache. Same grade/duty rules as hasJob.
if bridge.framework.hasGroup('ballas', 1) then endgetGroups()
local groups = bridge.framework.getGroups()| Returns | table<string, number>? — cached job/gang name → grade |
getPlayerBucket()
local bucket = bridge.framework.getPlayerBucket()| Returns | number — local routing bucket (LocalPlayer.state.bucket, default 0) |
getFrameworkJobs()
local jobs = bridge.framework.getFrameworkJobs()| Returns | table — all jobs registered in the framework |
getIdentifier()
local id = bridge.framework.getIdentifier()| Returns | string? — character identifier (citizenid / identifier) |
getCharacterName()
local full, first, last = bridge.framework.getCharacterName()| Returns | string?, string?, string? — full name, first name, last name |
getIsPlayerLoaded()
if bridge.framework.getIsPlayerLoaded() then end| Returns | boolean |
getAccountBalance(moneyType)
local cash = bridge.framework.getAccountBalance('cash')| Param | Type | Description |
|---|---|---|
moneyType | MoneyType | Account type (QBX also accepts 'money') |
| Returns | number |
Client balance is not authoritative. Use server getMoney for payouts or security checks.
isPlayerDead()
if bridge.framework.isPlayerDead() then return end| Returns | boolean — dead or in last stand |
getPlayerDob()
local dob = bridge.framework.getPlayerDob()| Returns | string? — date of birth |
Framework
Framework. bridge.framework wraps your active framework provider (qbx_core, qb-core, or es_extended). Client and server expose different methods.
Server
Framework (server). The server is the side that actually owns the player. Local status and display money live on client. Shared types: Framework.