Koja Scripts
KOJA-LIB

Player

Functions for reading the local player's data on the client side.

Player

Functions for reading the local player's data on the client side.

GetPlayerData

Returns the full player data object from the active framework.

local data = KOJA.Client.GetPlayerData()

Returns table — the framework's player data object.

Example

local data = KOJA.Client.GetPlayerData()
print(data.job.name)

GetPlayerJob

Returns the name of the player's current job.

local job = KOJA.Client.GetPlayerJob()

Returns string | nil

Example

local job = KOJA.Client.GetPlayerJob()
if job == 'police' then
    -- player is a cop
end

GetPlayerJobLabel

Returns the display label of the player's current job.

local label = KOJA.Client.GetPlayerJobLabel()

Returns string | nil

Example

local label = KOJA.Client.GetPlayerJobLabel()
print('Job:', label)  -- e.g. "Police Department"

IsDead

Returns whether the local player is dead.

local dead = KOJA.Client.IsDead()

Returns boolean

Example

if KOJA.Client.IsDead() then
    return
end
  • Callbacks — koja-lib provides a callback system that lets client scripts request data from the server and vice versa.
  • Inventory — Client-side inventory functions let you check what items the local player has without a server round-trip.
  • DUI — DUI (Dynamic UI) allows you to render a web page as a texture on any in-game surface — screens, billboards, laptops, phones, etc.
  • Money — Retrieve the local player's money balance from the client side via a server callback.
  • Keybinds — Register persistent key bindings that players can rebind in the GTA V settings menu.
  • Notifications — koja-lib provides two notification interfaces: SendNotify (routes through the configured backend) and LibNotify (built-in koja-lib notification).
  • Client API — back to the section overview