OnCodeChange
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void OnCodeChange( ModularCar carOccupant, BasePlayer player, string text )
{
Puts( "OnCodeChange works!" );
}
Location
- ModularCarGarage::RPC_RequestNewCode(BaseEntity/RPCMessage msg)
csharp
//---
if (player == null)
{
return;
}
string text = msg.read.String(256, false);
if (Interface.CallHook("OnCodeChange", this.carOccupant, player, text) != null)
{
return;
}
if (this.carOccupant.CarLock.TrySetNewCode(text, player.userID))
{
//---