Server Exports
GetProperty
Returns full data of a property by its ID.
---@param {propertyId: number | string}
---@return {propertyData: table | nil}
local propertyData = exports['vms_housing']:GetProperty(propertyId)
GetPlayerProperties
Returns a list of all properties owned / rented by the specified player.
---@param {identifier: number | string}: Player Server ID or Player Identifier
---@return {properties: table}: Data list of all properties
local properties = exports['vms_housing']:GetPlayerProperties(identifier)
GetPlayerCurrentProperty
Returns the ID of the property the player is currently inside (or nil
).
---@param {src: number}: Player Server ID
---@return {propertyId: string}
local propertyId = exports['vms_housing']:GetPlayerCurrentProperty(src)
IsPlayerInProperty
Returns true
if the player is inside any property.
---@param {src: number}: Player Server ID
---@param {propertyId: number | string}
---@return {isInProperty: boolean}
local isInProperty = exports['vms_housing']:IsPlayerInProperty(src, propertyId)
HasKeys
Returns true
if the player has keys to the specified property.
---@param {src: number}: Player Server ID
---@param {identifier: string}: Player Identifier (e.g. 'char1:1100113jadckz')
---@param {propertyId: number | string}
---@param {keyId: string} (Optional)
---@return {hasKeys: boolean}
local hasKeys = exports['vms_housing']:HasKeys(src, identifier, propertyId, keyId)
GenerateKeySerialNumber
Generates a unique serial number for a key for the given property.
---@param {propertyId: number | string}
---@return {serialNumber: boolean}
local serialNumber = exports['vms_housing']:GenerateKeySerialNumber(propertyId)
HasPermissions
Returns true
if the player has the specified permission for a property.
---@param {propertyId: number | string}
---@param {identifier: string}: Player Identifier (e.g. 'char1:1100113jadckz')
---@param {permission: string}
---@return {hasPermissions: boolean}
local hasPermissions = exports['vms_housing']:HasPermissions(propertyId, identifier, permission)
HasAnyPermission
Returns true
if the player has any kind of permission for that property.
---@param {propertyId: number | string}
---@param {identifier: string}: Player Identifier (e.g. 'char1:1100113jadckz')
---@return {hasAnyPermissions: boolean}
local hasAnyPermissions = exports['vms_housing']:HasAnyPermission(propertyId, identifier)
DeleteProperty
Deletes the property (used for admin tools or dev cleanup).
---@param {propertyId: number | string}
exports['vms_housing']:DeleteProperty(propertyId)
AddStarterApartment
Gives a player a predefined starter apartment (e.g. at character creation).
---@param {identifier: string}: Player Identifier (e.g. 'char1:1100113jadckz')
exports['vms_housing']:AddStarterApartment(identifier)
Last updated
Was this helpful?