core.plugins.doors.sv_init
Door / Property Plugin
This module handles the majority of door interaction, along with the backend for the properties system.
- Servercityrp.door.commands.access(ply, door, mainDoor, arguments)Source ☍
-
Parameters
- plyany
- doorany
- mainDoorany
- argumentsany
- Servercityrp.door.commands.color(ply, door, mainDoor, arguments)Source ☍
-
Parameters
- plyany
- doorany
- mainDoorany
- argumentsany
- Servercityrp.door.commands.name(ply, door, mainDoor, arguments)Source ☍
-
Parameters
- plyany
- doorany
- mainDoorany
- argumentsany
- Servercityrp.door.commands.propertyname(ply, door, mainDoor, arguments)Source ☍
-
Parameters
- plyany
- doorany
- mainDoorany
- argumentsany
- Servercityrp.door.commands.purchase(ply, door, mainDoor, arguments)Source ☍
-
Parameters
- plyany
- doorany
- mainDoorany
- argumentsany
- Servercityrp.door.commands.rentpayer(ply, door, mainDoor, arguments)Source ☍
-
Parameters
- plyany
- doorany
- mainDoorany
- argumentsany
- Servercityrp.door.commands.rentpayerrem(ply, door, mainDoor, arguments)Source ☍
-
Parameters
- plyany
- doorany
- mainDoorany
- argumentsany
- Servercityrp.door.commands.sell(ply, door, mainDoor, arguments)Source ☍
-
Parameters
- plyany
- doorany
- mainDoorany
- argumentsany
- Servercityrp.door.commands.sellall(ply, door, mainDoor, arguments)Source ☍
-
Parameters
- plyany
- doorany
- mainDoorany
- argumentsany
- Servercityrp.door.getPrice(door) → numberSource ☍
-
Get the purchase price of the property a door belongs to.
Parameters
- doorEntityAny door belonging to the property.
Returns
- numberThe price of the property, or
0if the door isn't part of a property.
- Servercityrp.door.getProperty(door) → table?Source ☍
-
Resolve the property a door belongs to. This reads
cityrp.door.propertiesrather than the networked vars on the door, so it is authoritative even before (or if) the networked vars have replicated to a client.Parameters
- doorEntityAny door belonging to the property.
Returns
- table?The property entry (
{name, doors, rent, dbId}), ornilif the door isn't part of a property.
- Servercityrp.door.getPropertyName(door) → stringSource ☍
-
Get the name of the property a door belongs to.
Parameters
- doorEntityAny door belonging to the property.
Returns
- stringThe property name, or an empty string if the door isn't part of a property.
- Servercityrp.door.load()Source ☍
-
Function called on DB connection to load map properties.
- Servercityrp.door.lock(ply, ent) → booleanSource ☍
-
Lock a door or owned vehicle, including any paired door leaf.
Parameters
Returns
- booleanTrue when a lock action was attempted.
- Servercityrp.door.unlock(ply, ent) → booleanSource ☍
-
Unlock a door or owned vehicle, including any paired door leaf.
Parameters
Returns
- booleanTrue when an unlock action was attempted.
- Serverpropcommand(ply, args)Source ☍
-
Parameters
- plyany
- argsany