CanLock
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void CanLock( BasePlayer player, CodeLock instance )
{
Puts( "CanLock works!" );
}
csharp
private void CanLock( BasePlayer player, KeyLock instance )
{
Puts( "CanLock works!" );
}
Location
- CodeLock::TryLock(BaseEntity/RPCMessage rpc)
- KeyLock::Lock(BasePlayer player)
csharp
//---
}
if (this.code.Length != 4)
{
return;
}
if (Interface.CallHook("CanLock", rpc.player, this) != null)
{
return;
}
if (!this.whitelistPlayers.Contains(rpc.player.userID))
{
//---
csharp
//---
}
if (base.IsLocked())
{
return;
}
if (Interface.CallHook("CanLock", player, this) != null)
{
return;
}
if (!this.HasLockPermission(player))
{
//---