GetCurrentProperty
lua
It only works while the player is inside a shell, an IPL or an MLO interior. Standing in a yard does not count. Use GetCurrentPropertyId if you also need yards.
Return Value
The following table, or nil if the player is not inside a property:
- id:
numberThe property ID - owner:
stringThe owner identifier (citizenid or job name) - label:
stringThe property name - price:
numberThe property price - type:
'shell' | 'ipl' | 'mlo'The property type - doorLocked:
booleanWhether the front door is locked - keyHolders:
table<string, table<string, boolean>>The key holders known on the client - hasKey:
function(lock?: string): booleanWhether the player has access. Pass a lock ID to check one lock, or nothing to check entry access - isOwner:
function(): booleanWhether the player owns the property
Example
lua