OnCupboardDeauthorize
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private object OnCupboardDeauthorize( VehiclePrivilege instance, BasePlayer player )
{
Puts( "OnCupboardDeauthorize works!" );
return null;
}Location
- VehiclePrivilege::RemoveSelfAuthorize(BaseEntity.RPCMessage rpc)
csharp
[RPC_Server.MaxDistance(3f)]
[RPC_Server]
private void RemoveSelfAuthorize(RPCMessage rpc)
{
if (rpc.player.CanInteract() && CanModifyAuth(rpc.player) && Interface.CallHook("OnCupboardDeauthorize", this, rpc.player) == null)
{
authorizedPlayers.Remove(rpc.player.userID);
Facepunch.Rust.Analytics.Azure.OnEntityAuthChanged(this, rpc.player, authorizedPlayers, "removed", rpc.player.userID);
UpdateMaxAuthCapacity();
UpdatePrivilegeReceivers();
//---