Skip to content

CanChangeGrade

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void CanChangeGrade( BasePlayer player, BuildingBlock instance, Enum iGrade, ulong iSkin )
{
    Puts( "CanChangeGrade works!" );
}

Location

  • BuildingBlock::CanChangeToGrade(BuildingGrade/Enum iGrade, ulong iSkin, BasePlayer player)
csharp
private bool CanChangeToGrade(BuildingGrade.Enum iGrade, ulong iSkin, BasePlayer player)
{
	object returnvar = Interface.CallHook("CanChangeGrade", player, this, iGrade, iSkin);
	if (returnvar is bool)
	{
		return (bool)returnvar;
	}
	return (player.IsInCreativeMode && ConVar.Creative.freeBuild) || (this.HasUpgradePrivilege(iGrade, iSkin, player) && !this.IsUpgradeBlocked());
//---

Released under the MIT License.