Skip to content

OnRotateVendingMachine

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

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

Location

  • VendingMachine::RPC_RotateVM(BaseEntity.RPCMessage msg)
csharp
[RPC_Server]
[RPC_Server.IsVisible(3f)]
public void RPC_RotateVM(RPCMessage msg)
{
	if (Interface.CallHook("OnRotateVendingMachine", this, msg.player) == null && CanRotate())
	{
		UpdateEmptyFlag();
		if (msg.player.CanBuild() && IsInventoryEmpty())
		{
			base.transform.rotation = Quaternion.LookRotation(-base.transform.forward, base.transform.up);
//---

Released under the MIT License.