Summary

Hooks

Called after Catwork has loaded all map entities; restores the personal door owners.
Restores the personal doors saved for the current map.
Called when a player's access to a door is checked; grants basic access to the door's personal owners.
Saves the owners, position and startLocked setting of every personal door to plugins/personaldoors/<map>.

Hooks

PLUGIN:ClockworkInitPostEntity()

server gamemodes/cwhl2rp/plugins/personaldoors/plugin/sv_hooks.lua:18

Implements hook ClockworkInitPostEntity

Called after Catwork has loaded all map entities; restores the personal door owners.

Restores the personal doors saved for the current map.

Saved doors are matched to the map's doors by position. Each door's owner names are stored lowercased in entity._OwningPersons, the record goes into self.personalDoors, and the door is locked or unlocked according to its startLocked setting.

See also

PLUGIN:PlayerDoesHaveDoorAccess(player, door, access, isAccurate)

server gamemodes/cwhl2rp/plugins/personaldoors/plugin/sv_hooks.lua:30

Implements hook PlayerDoesHaveDoorAccess

Called when a player's access to a door is checked; grants basic access to the door's personal owners.

Owners are matched by character name, ignoring case.

Parameters

  • player Player The player whose access is checked
  • door Entity The door
  • access Number The DOOR_ACCESS_* level being checked; only DOOR_ACCESS_BASIC is granted
  • isAccurate Boolean Whether the exact access level must match

Returns

  • Boolean true for a personal owner, otherwise nil to let other hooks decide

Saves the owners, position and startLocked setting of every personal door to plugins/personaldoors/<map>.

See also

Defined in