Skip to content

OnCodeChanged

Usage

  • No return behavior

Example Autogenerated

csharp
private void OnCodeChanged( BasePlayer player, CodeLock instance, string text, bool flag )
{
    Puts( "OnCodeChanged works!" );
}

Location

  • CodeLock::RPC_ChangeCode(BaseEntity/RPCMessage rpc)
csharp
//---
		this.guestCode = text;
		this.hasGuestCode = (this.guestCode.Length > 0);
		this.guestPlayers.Clear();
		this.guestPlayers.Add(rpc.player.userID);
	}
	Interface.CallHook("OnCodeChanged", rpc.player, this, text, flag);
	this.DoEffect(this.effectCodeChanged.resourcePath);
	base.SendNetworkUpdate(BasePlayer.NetworkQueue.Update);
}

Released under the MIT License.