Skip to content

CanSetBedPublic

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

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

Location

  • SleepingBag::RPC_MakePublic(BaseEntity/RPCMessage msg)
csharp
//---
	bool flag = msg.read.Bit();
	if (flag == this.IsPublic())
	{
		return;
	}
	if (Interface.CallHook("CanSetBedPublic", msg.player, this) != null)
	{
		return;
	}
	this.SetPublic(flag);
	if (!this.IsPublic())
//---

Released under the MIT License.