Skip to content

OnSpinWheel

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private object OnSpinWheel( BasePlayer player, SpinnerWheel instance )
{
    Puts( "OnSpinWheel works!" );
    return null;
}

Location

  • SpinnerWheel::RPC_Spin(BaseEntity.RPCMessage rpc)
csharp
[RPC_Server.MaxDistance(3f)]
[RPC_Server]
private void RPC_Spin(RPCMessage rpc)
{
	if (rpc.player.CanInteract() && AllowPlayerSpins() && (AnyoneSpin() || rpc.player.CanBuild()) && Interface.CallHook("OnSpinWheel", rpc.player, this) == null && !(velocity > 15f))
	{
		velocity += UnityEngine.Random.Range(4f, 7f);
		ToggleChildEntityColliders(state: false);
	}
}

Released under the MIT License.