Module cityrp.door

Door Shared

Module Overview

Functions

cityrp.door.isDoor(ent) Check if a given entity is a door.
cityrp.door.openDoor(ent, delay[, unlock[, sound]]) Open a given door.
cityrp.door.blowDoor(entity, breachpos) Blow open a door or force passengers from a vehicle.
cityrp.door.ramDoor(ent, ply, sound) Ram a door.
cityrp.door.pickDoor(ent, ply, sound) Lockpick a door.
cityrp.door.load() Function called on DB connection to load map properties.

Tables

cityrp.door.properties A list of current properties.
cityrp.door.commands A table to store our command handlers.

Functions

cityrp.door.isDoor(ent)
Check if a given entity is a door.

Parameters:

  • ent Entity Entity to check.

Returns:

    boolean If the entity is a door.
cityrp.door.openDoor(ent, delay[, unlock[, sound]])
Open a given door.

Parameters:

  • ent Entity Door to unlock.
  • delay number Time to wait for before opening.
  • unlock bool If the door should be force-unlocked. (optional)
  • sound bool If an impact sound should be played. (optional)
cityrp.door.blowDoor(entity, breachpos)
Blow open a door or force passengers from a vehicle.

Parameters:

  • entity Entity Door/Vehicle being blown open.
  • breachpos Vector Center of the explosion.
cityrp.door.ramDoor(ent, ply, sound)
Ram a door.

Parameters:

  • ent Entity Door to be rammed.
  • ply Player Player ramming the door.
  • sound bool If a sound should be played.
cityrp.door.pickDoor(ent, ply, sound)
Lockpick a door.

Parameters:

  • ent Entity Door to be lockpicked.
  • ply Player Player ramming the door.
  • sound bool If a sound should be played.
cityrp.door.load()
Function called on DB connection to load map properties.

Tables

cityrp.door.properties
A list of current properties.
cityrp.door.commands
A table to store our command handlers.