CanChangeCode
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private object CanChangeCode( BasePlayer player, CodeLock instance, string text, bool flag )
{
Puts( "CanChangeCode works!" );
return null;
}Location
- CodeLock::RPC_ChangeCode(BaseEntity.RPCMessage rpc)
csharp
//---
{
return;
}
string text = rpc.read.String();
bool flag = rpc.read.Bit();
if (!IsLocked() && text.Length == 4 && text.IsNumeric() && !(!hasCode && flag) && Interface.CallHook("CanChangeCode", rpc.player, this, text, flag) == null)
{
if (!hasCode && !flag)
{
SetFlag(Flags.Locked, b: true);
}
//---