Skip to content

OnVendingShopRename

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnVendingShopRename( VendingMachine instance, string obj, BasePlayer player )
{
    Puts( "OnVendingShopRename works!" );
}

Location

  • VendingMachine::RPC_UpdateShopName(BaseEntity/RPCMessage msg)
csharp
//---
{
	BasePlayer player = msg.player;
	string obj = msg.read.String(32, false);
	if (this.CanPlayerAdmin(player))
	{
		if (Interface.CallHook("OnVendingShopRename", this, obj, player) != null)
		{
			return;
		}
		this.shopName = obj;
		this.nameLastEditedBy = player.userID.Get();
//---

Released under the MIT License.