Summary
Hooks
Called after Catwork has loaded all map entities; restores the personal door owners.
LoadDoorData()server
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.
SaveDoorData()server
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:18Implements 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:30Implements 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; onlyDOOR_ACCESS_BASICis granted - isAccurate Boolean Whether the exact access level must match
Returns
- Boolean
truefor a personal owner, otherwisenilto let other hooks decide
Saves the owners, position and startLocked setting of every personal door to plugins/personaldoors/<map>.