PHP Code:
#include <tf2_stocks>
public OnPluginStart()
{
HookEvent("player_builtobject", Object_Built);
}
public Object_Built(Handle:event, const String:name[], bool:dontBroadcast)
{
new building = GetEventInt(event, "index");
if(GetEntProp(building, Prop_Send, "m_bMiniBuilding")) return;
new weapon = GetPlayerWeaponSlot(GetClientOfUserId(GetEventInt(event, "userid")), TFWeaponSlot_Melee);
if(IsValidEntity(weapon) && GetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex") == 155)
{
SetEntProp(building, Prop_Send, "m_iHighestUpgradeLevel", 3);
}
}