Skip to content

CanNetworkTo

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void CanNetworkTo( BaseNetworkable instance, BasePlayer player )
{
    Puts( "CanNetworkTo works!" );
}

Location

  • BaseNetworkable::ShouldNetworkTo(BasePlayer player)
csharp
public virtual bool ShouldNetworkTo(BasePlayer player)
{
	object returnvar = Interface.CallHook("CanNetworkTo", this, player);
	if (returnvar is bool)
	{
		return (bool)returnvar;
	}
	return this.net.group == null || player.net.subscriber.IsSubscribed(this.net.group);
//---

Released under the MIT License.