Server
Property ids are whatever the housing script uses: a home id, a house name, or an apartment name. esx_property ids are positions in its property list.
GetCurrentProperty
Parameters
sourcenumber
Returns
string|number|nil — nil when outside. ps-housing only knows it for players with access. bcs_housing yields for up to 5 seconds while that player's client answers.
Example
local property = Bridge.GetCurrentProperty(source)
if property then print(('%s is inside %s'):format(source, property)) endGetOwnedProperties
Parameters
sourcenumber
Returns
table — list of property ids
Example
for _, id in ipairs(Bridge.GetOwnedProperties(source)) do
print(id)
endHasPropertyAccess
True for the owner and for key holders.
Parameters
sourcenumberidstring|number
Returns
boolean
Example
local property = Bridge.GetCurrentProperty(source)
if property and Bridge.HasPropertyAccess(source, property) then
Bridge.Notify(source, { description = 'Stash unlocked.', type = 'success' })
end