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)EnterProperty
Enter the property (used for admin tools or dev cleanup).
---@param {src: number}: Player Server ID
---@param {propertyId: number | string}
exports['vms_housing']:EnterProperty(src, propertyId)DeleteProperty
Deletes the property (used for admin tools or dev cleanup).
---@param {propertyId: number | string}
exports['vms_housing']:DeleteProperty(propertyId)CreateDirtAtCoords
Creating dirt for the house.
You can use this in your eating / drinking system when a player eats, they may leave a stain or crumbs.
---@param {propertyId: number | string}
---@param {model: string}: Dirt object model from VMS Housing files
---@param {position: vector3}
---@param {heading: number}
exports['vms_housing']:CreateDirtAtCoords(propertyId, model, position, heading)DropPlayerFromProperty
Kick a player out of the property immediately without screen fade-in/fade-out
---@param {src: number}: Player Server ID
exports['vms_housing']:DropPlayerFromProperty(src)AddStarterApartment
Gives a player a predefined starter apartment (e.g. at character creation).
---@param {src: number}: Player Server ID
exports['vms_housing']:AddStarterApartment(src)Last updated
Was this helpful?