# Player Metadata

<mark style="color:green;">Complete Player Metadata List:</mark>

```
-- Metadata Name, example value, --type/explaination
-- (Tables to be added soon)

injail              0       -- 0 = Not in jail, 1 = In Jail
tracker             false   -- Bool
inside              -- Table
    name: value
dealerrep           23      -- Int
bloodtype	    O+
drugxp	            23      -- Int
criminalrecord	    -- Table
    name: value    
phone	table
    name: value
jobrep	table
    name: value
ishandcuffed	    false   -- Bool
craftingrep	    0       -- Int
fitbit	            -- Table
    name: value
inlaststand	    false
status	            -- Table
    name: value
farmingxp	    13      -- Int
fingerprint	    If13... -- String
communityservice    0
licences	    -- Table
    name: value
isdead	            false   -- Bool
callsign	    NO CALLSIGN 
commandbinds	    -- Table
    name: value
walletid	    QB-4... -- String
phonedata	    -- Table
    name: value
armor	            10      -- Int
hunger	            53.0    -- Int
stress	            0       -- Int
thirst	            58.0    -- Int
jailitems	    -- Table
    name: value
attachmentcraftingrep       -- Int
```

<mark style="color:green;">**How to use:**</mark>\
\
This will return the current player metadata state for a name from above.<br>

```lua
-- !!Metadata must be retrived from a client script!!

QBCore = exports['qb-core']:GetCoreObject()

-- If it has a type

QBCore.Functions.GetPlayerData().metadata.{meta_name} -- Returns meta's value (if the meta has a table it will return something like 0x23423

-- OR if its a table

QBCore.Functions.GetPlayerData().metadata.{meta_name}.{table_key} -- Returns the value associated with a key from the meta's table. 
```

Example:

```lua
-- !!Metadata must be retrived from a client script!!

QBCore = exports['qb-core']:GetCoreObject()
local playerData = QBCore.Functions.GetPlayerData()
local playerMeta = playerData.metadata


if playerMeta["isdead"] then
 -- Execute Code
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ga1a.xyz/player-metadata.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
