Server Exports
Server-side exports exposed by kartik-properties. Call these from any server script.
| Export | Returns |
|---|---|
GetCitizenProperties | Owned + leased property records for a citizen |
GetPlayerHousingData | Normalized phone housing records array |
GetPropertyHousingData | Normalized housing data for a specific house |
GetAllProperties | Every property as shaped records |
GetPropertyById | One shaped property record, or nil |
GetPlayerProperties | Raw kp_properties rows a citizen owns |
GrantHousingKey | Grants key access to a citizen ID |
RevokeHousingKey | Revokes key access from a citizen ID |
SetPropertyLocked | Toggles / sets property front door lock state |
GetCompanyFunds | A company's bank balance |
IsPlayerInProperty | Property id a player is inside, or nil |
AddFurnitureItem | Registers a runtime furniture definition |
AssignStarterApartment | Leases a starter unit to a player (boolean) |
🚗 External garage API
Read-only, citizen-id based exports for third-party garage resources. Property garages save vehicles with garage = 'kp_prop_<propertyId>'; these exports let a garage script resolve that id, list it, and check access. See Garages → External garage resources.
| Export | Returns |
|---|---|
IsPropertyGarage | Whether a garage id belongs to kartik-properties |
GetPropertyGarage | One garage record, or nil |
GetPropertyGarages | Every property garage a citizen may use |
CanUsePropertyGarage | Whether a citizen may open that garage |
GetPropertyGarageVehicles | Vehicles a citizen has parked there |
GetPropertyGarageSlots | used, total slots for a citizen |
📦 The shaped property record
GetCitizenProperties, GetAllProperties and GetPropertyById all return records in the same normalised shape:
| Field | Type | Description |
|---|---|---|
id | number | Property id (kp_properties.id). |
label | string | Display name of the property. |
unitNo | string | Unit number for multi-unit entrances (may be nil). |
shell | string | Interior shell key. |
coords | table | Entrance position { x, y, z }. |
ownerType | string | "citizen", "company" or "state". |
ownerId | string | Citizen id or company id of the owner. |
ownerName | string | Resolved owner display name (citizen name, company name or "State"). |
price | number | Sale price. |
rentPrice | number | Rent price (may be 0). |
listing | string | "none", "for_sale" or "for_rent". |
conditionPct | number | Property condition, 0–100. |
blockId | number | Owning block id (may be nil). |
district | string | District name from the block (may be nil). |
tenant | boolean | true when the citizen holds this via a lease rather than a deed. |