Summary
Hooks
Spawns a frozen
cw_combinelock parented to a door.Returns whether a player can open a Combine lock.
Hooks
Schema:ApplyCombineLock(entity, position, angles, access, rank, color)
server gamemodes/cwhl2rp/plugins/combinelocks/plugin/sv_schema.lua:50Spawns a frozen cw_combinelock parented to a door.
local lock = Schema:ApplyCombineLock(door, trace, trace.HitNormal:Angle(), 2)
Parameters
- entity Entity The door
- position Vector optional, defaults to
nilThe lock's position; a traceMapinstead places it at the standard offset on aprop_door_rotating, pushed 4 units out alongHitNormal - angles Angle optional, defaults to
nilThe lock's angles - access Number optional, defaults to
nilThe lock's access level, 1 to 4 - rank List<String> optional, defaults to
nilCombine ranks the lock is closed to - color Color optional, defaults to
nilThe lock's light colour
Returns
- Entity The new lock, or
nilwhen it could not be created
Schema:PlayerHasCombineLockAccess(client, access, rank)
server gamemodes/cwhl2rp/plugins/combinelocks/plugin/sv_schema.lua:20Returns whether a player can open a Combine lock.
Combine players have access unless their rank is one the lock is restricted for. Other
players need the combine_lock_access_<access> card or the combine_lock_access_x card.
Parameters
- client Player The player to check
- access Number The lock's access level, 1 to 4
- rank List<String> optional, defaults to
nilCombine ranks the lock is closed to, as set with/SetCombineLockRank
Returns
- Boolean Whether the player has access