Skip to content

CanLock

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void CanLock( BasePlayer player, ModularCar owner, ModularCarCodeLock instance )
{
    Puts( "CanLock works!" );
}

Location

  • ModularCarCodeLock::HasLockPermission(BasePlayer player)
csharp
//---
	}
	if (!player.IsValid() || player.IsDead())
	{
		return false;
	}
	object returnvar = Interface.CallHook("CanLock", player, this.owner, this);
	if (returnvar is bool)
	{
		return (bool)returnvar;
	}
	return this.whitelistPlayers.Contains(player.userID);
//---

Released under the MIT License.