Server Exports
GetProperty
Returns full data of a property by its ID.
---@param {propertyId: number | string}: Property ID
---@return {propertyData: table | nil}
local propertyData = exports['vms_housing']:GetProperty(propertyId)GetAllProperties
Returns full list of a properties.
local properties = exports['vms_housing']:GetAllProperties()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).
IsPlayerInProperty
Returns true if the player is inside any property.
HasKeys
Returns true if the player has keys to the specified property.
GenerateKeySerialNumber
Generates a unique serial number for a key for the given property.
HasPermissions
Returns true if the player has the specified permission for a property.
HasAnyPermission
Returns true if the player has any kind of permission for that property.
EnterProperty
Enter the property (used for admin tools or dev cleanup).
GiveProperty
Give the property to a player or company
DeleteProperty
Deletes the property (used for admin tools or dev cleanup).
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.
DropPlayerFromProperty
Kick a player out of the property immediately without screen fade-in/fade-out
AddStarterApartment
Gives a player a predefined starter apartment (e.g. at character creation).
TeleportToStartingApartment
Teleport the player directly to the property.
RegisterHook
Last updated
Was this helpful?