Client side

GetCurrentPropertyId

Returns the current property id.

---@return number|nil The current property id.
exports.nolag_properties:GetCurrentPropertyId()

GetCurrentProperty

Returns the current property data.

---@return { id: number, owner: string, label: string, price: number, type: string, doorLocked: boolean, hasKey: function, isOwner: function } | nil The current property.
exports.nolag_properties:GetCurrentProperty()

IsPointInsideProperty

Returns if the point is inside the property.

---@param propertyId number
---@param point vector3
---@return boolean
exports.nolag_properties:IsPointInsideProperty(propertyId, point)

OpenPropertyMenu

Opens the property menu.

exports.nolag_properties:OpenPropertyMenu()

RemoveKey

Removes a key from the specified property.

---@param propertyId any The property id.
---@param keyHolder string The identifier of the player
---@return boolean Whether the key was removed or not.
exports.nolag_properties:RemoveKey(propertyId, keyHolder)

AddKey

Adds a key to the specified property.

---@param propertyId any The property id.
---@param keyHolder string The identifier of the player
---@return boolean Whether the key was added or not.
exports.nolag_properties:AddKey(propertyId, keyHolder)

SetWaypointToProperty

Sets a waypoint to the specified property.

---@param propertyId any The property id.
exports.nolag_properties:SetWaypointToProperty(propertyId)

GetAllProperties

Returns all the properties that are owned by the specified owner.

---@param ownerType "user" | "society" | "both" The type of the owner.
---@return {id: number, label: string, price: number, type: string, doorLocked: boolean, hasKey: function, isOwner: function} The properties that are owned by the specified owner.
exports.nolag_properties:GetAllProperties(ownerType)

PoliceRaidDoor

This export can be used on an item trigger, for example, on a storm ram, and it's used to raid an MLO by breaking the door

exports.nolag_properties:PoliceRaidDoor()

Last updated