printl("Player Attributes Loaded") const SCOUT_MONEY_PICKUP_PENALTY = 10; ::PlayerAttribs <- {} ::PlayerAttribs.OnGameEvent_post_inventory_application <- function(params) { if (IsPlayerABot(GetPlayerFromUserID(params.userid) || GetPlayerFromUserID(params.userid).GetTeam() != TF_TEAM_PVE_DEFENDERS)) return; local player = GetPlayerFromUserID(params.userid) player.AddCustomAttribute("maxammo primary increased", 2, -1); player.AddCustomAttribute("maxammo secondary increased", 2, -1); player.AddCustomAttribute("maxammo primary increased", 2, -1); //normal sticky ammo if (player.GetPlayerClass() == TF_CLASS_DEMOMAN) player.AddCustomAttribute("hidden secondary max ammo penalty", 0.5, -1) //engineer if (player.GetPlayerClass() == TF_CLASS_ENGINEER) { // player.AddCustomAttribute("max health additive bonus", 75, -1); // player.AddCustomAttribute("upgrade rate decrease", 2, -1); player.AddCustomAttribute("mod teleporter cost", 0.001, -1); player.AddCustomAttribute("engineer sentry build rate multiplier", 2, -1); player.AddCustomAttribute("engineer teleporter build rate multiplier", 3, -1); player.AddCustomAttribute("maxammo metal increased", 2, -1); } //show medic hint for upgrades if (player.GetPlayerClass() == TF_CLASS_MEDIC && GetPropBool(player, "m_Shared.m_bInUpgradeZone")) ClientPrint(player, 4, "Mediguns cannot be upgraded in this mission"); //we only modify primary/secondary weapons, don't need to iterate through all 7 for (local i = 0; i < 2; i++) { local wep = GetPropEntityArray(player, "m_hMyWeapons", i); if (wep == null) continue; if (wep.GetClassname() == "tf_weapon_flamethrower") { //give phlog normal rage building if (GetPropInt(wep, "m_AttributeManager.m_Item.m_iItemDefinitionIndex") == ITEMINDEX_THE_PHLOGISTINATOR) { wep.AddAttribute("mod rage on hit bonus", 1, -1); wep.ReapplyProvision(); return; } //old flames wep.AddAttribute("lunchbox adds minicrits", 2, -1) wep.ReapplyProvision(); return; } if (wep.GetClassname() == "tf_weapon_medigun") { //medigun nerf wep.AddAttribute("overheal penalty", 0, -1); wep.ReapplyProvision(); return; } } } ::PlayerAttribs.OnGameEvent_mvm_pickup_currency <- function(params) { if (PlayerInstanceFromIndex(params.player).GetPlayerClass() != TF_CLASS_SCOUT) return; local player = PlayerInstanceFromIndex(params.player) player.SetHealth(player.GetHealth() - SCOUT_MONEY_PICKUP_PENALTY) } __CollectGameEventCallbacks(::PlayerAttribs) //m_flCurrentRechargeDuration