Skip to content

OnCupboardDeauthorize

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

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

Location

  • BuildingPrivlidge::RemoveSelfAuthorize(BaseEntity.RPCMessage rpc)
csharp
[RPC_Server.IsVisible(3f)]
[RPC_Server]
private void RemoveSelfAuthorize(RPCMessage rpc)
{
	if (rpc.player.CanInteract() && CanAdministrate(rpc.player) && Interface.CallHook("OnCupboardDeauthorize", this, rpc.player) == null)
	{
		RemovePlayer(rpc.player, rpc.player.userID);
		SendNetworkUpdate();
	}
}

Released under the MIT License.