Skip to content

OnCupboardAuthorize

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

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

Location

  • VehiclePrivilege::AddSelfAuthorize(BaseEntity.RPCMessage rpc)
csharp
[RPC_Server.MaxDistance(3f)]
[RPC_Server]
private void AddSelfAuthorize(RPCMessage rpc)
{
	if (rpc.player.CanInteract() && CanModifyAuth(rpc.player) && Interface.CallHook("OnCupboardAuthorize", this, rpc.player) == null)
	{
		AddPlayer(rpc.player);
		SendNetworkUpdate();
	}
}

Released under the MIT License.