GetPropertyData
lua
You get a copy. Changing the returned table does not change the property.
Parameters
- propertyId:
numberThe property ID
Return Value
The following table, or nil if the property doesn't exist:
- id:
numberThe property ID - label:
stringThe property name - address:
stringThe property address - type:
'shell' | 'ipl' | 'mlo'The property type - buildingId:
number | nilThe building ID, if the property is inside a building - price:
numberThe sale price - rentPrice:
numberThe rent price - forSale:
booleanWhether the property is listed for sale - forRent:
booleanWhether the property is listed for rent - doorLocked:
booleanWhether the front door is locked - owner:
stringThe owner identifier (citizenid, job name, orgovernment) - ownerType:
'user' | 'society' | 'government'The type of owner - purchasePrice:
number | nilThe price the property was bought for - purchaseDate:
string | nilThe date the property was bought - keyHolders:
table<string, table<string, boolean>>The key holders, by identifier. Each one maps lock IDs to access. - rentData:
table | nilThe current rental:identifier,type,rentedFrom,rentedTo,rentedPrice,autoRenew, and the rent history inrentData - utilities:
tableThe last payment time ofelectricity,waterandinternet - consumption:
{ electricity: number, water: number }The current usage - additionalLocks:
{ id: string, label: string }[]The extra locks of the property - metadata:
tableEverything else, such asenterData,exitCoords,yardZone,insideZone,points,inventoryData,upgradesandisStarter
Example
lua