Module core.plugins.unownable.sv_init
Unownable Doors Plugin
Module Overview
Functions
| PLUGIN.FromPosition(pos, completed) | Gets the door entity from a given position. |
| PLUGIN.FromIndex(index, entList, completed) | Get a door entity from a given map creation ID. |
| PLUGIN.LoadDoor(ent, name) | Load a door's data onto an entity. |
| PLUGIN.loadUnownable() | Load the unownable doors from the server. |
| PLUGIN.initPostEntity() | Function called when the map has loaded all its entities. |
| PLUGIN.playerCanRamDoor(ply, door) | Hook called when a player attempts to ram a door. |
| PLUGIN.playerCanViewDoor(ply, door) | Hook called when a player attempts to view a door. |
| PLUGIN.playerCanOwnDoor(ply, door) | Hook called when a player attempts to buy a door. |
| PLUGIN.saveUnownable() | A function to save the unownable doors. |
- PLUGIN.FromPosition(pos, completed)
-
Gets the door entity from a given position.
Parameters:
- pos String representation of a position loaded from data file.
- completed Table of already loaded doors, maped by EntIndex.
Returns:
-
List of found doors.
- PLUGIN.FromIndex(index, entList, completed)
-
Get a door entity from a given map creation ID.
Parameters:
- index The ID of the door to find.
- entList The list of entities to search through.
- completed Table of already loaded doors, maped by EntIndex
Returns:
-
List of found doors.
- PLUGIN.LoadDoor(ent, name)
-
Load a door's data onto an entity.
Parameters:
- ent The entity to load.
- name The name of the door to load onto.
- PLUGIN.loadUnownable()
- Load the unownable doors from the server.
- PLUGIN.initPostEntity()
- Function called when the map has loaded all its entities.
- PLUGIN.playerCanRamDoor(ply, door)
-
Hook called when a player attempts to ram a door.
Parameters:
- ply The player ramming the door.
- door The door being rammed.
Returns:
-
bool If the ram has been allowed.
- PLUGIN.playerCanViewDoor(ply, door)
-
Hook called when a player attempts to view a door.
Parameters:
- ply The player viewing the door.
- door The door being viewed.
Returns:
-
bool If the view has been allowed.
- PLUGIN.playerCanOwnDoor(ply, door)
-
Hook called when a player attempts to buy a door.
Parameters:
- ply The player buying the door.
- door The door being bought.
Returns:
-
bool If the buy has been allowed.
- PLUGIN.saveUnownable()
- A function to save the unownable doors.