Skip to content

CanAffordUpgrade

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

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

Location

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

Released under the MIT License.