GetPlayerProperties
exports['kartik-properties']:GetPlayerProperties(cid)๐น Description
Returns the raw kp_properties rows a citizen owns, straight from the database. Unlike GetCitizenProperties, this does not normalise the shape, does not resolve owner names, and does not include leased units, it is a thin, low-level query.
Prefer GetCitizenProperties for display; use this when you need the exact database columns.
๐ง Parameters
| Name | Type | Required | Description |
|---|---|---|---|
cid | string | number | โ | The owning citizen id. |
๐ค Returns
| Type | Description |
|---|---|
table[] | Raw kp_properties rows where owner_type = 'citizen' and owner_id = cid. Empty table if none. |
๐ง Example Usage
local rows = exports['kartik-properties']:GetPlayerProperties('ABC12345')
for _, row in ipairs(rows) do
print(row.id, row.label, row.price, row.listing)
end๐ Notes
- Columns match the
kp_propertiestable (id,label,shell,owner_type,owner_id,price,listing, โฆ). JSON columns such asentranceare returned as encoded strings. - Only citizen-owned properties are returned, company and state stock are excluded.