Skip to content

OnDeleteVendingOffer

Usage

  • No return behavior

Example Autogenerated

csharp
private void OnDeleteVendingOffer( VendingMachine instance, int num )
{
    Puts( "OnDeleteVendingOffer works!" );
}

Location

  • VendingMachine::RPC_DeleteSellOrder(BaseEntity/RPCMessage msg)
csharp
//---
	if (!this.CanPlayerAdmin(player))
	{
		return;
	}
	int num = msg.read.Int32();
	Interface.CallHook("OnDeleteVendingOffer", this, num);
	if (num >= 0 && num < this.sellOrders.sellOrders.Count)
	{
		ProtoBuf.VendingMachine.SellOrder sellOrder = this.sellOrders.sellOrders[num];
		Facepunch.Rust.Analytics.Azure.OnVendingMachineOrderChanged(msg.player, this, sellOrder.itemToSellID, sellOrder.itemToSellAmount, sellOrder.itemToSellIsBP, sellOrder.currencyID, sellOrder.currencyAmountPerItem, sellOrder.currencyIsBP, false);
		this.sellOrders.sellOrders.RemoveAt(num);
//---

Released under the MIT License.