public override void OnPlayerKilled(Entity player, Entity inflictor, Entity attacker, int damage, string mod, string weapon, Vector3 dir, string hitLoc) { if (mod == "MOD_HEAD_SHOT") { player.Call("detachall"); } PerkCola.ResetPerkCola(player); if (attacker == null || !attacker.IsPlayer || attacker.GetTeam() == player.GetTeam()) { return; } if (attacker.GetTeam() == "allies") { if (player.GetField <int>("rtd_flag") == 1) { if (Call <int>("getdvarint", "bonus_double_points") == 1) { attacker.WinCash(400); } else { attacker.WinCash(200); } } else if (player.GetField <int>("rtd_king") == 1) { if (Call <int>("getdvarint", "bonus_double_points") == 1) { attacker.WinCash(1000); } else { attacker.WinCash(500); } } else { if (Call <int>("getdvarint", "bonus_double_points") == 1) { attacker.WinCash(200); } else { attacker.WinCash(100); } } attacker.WinPoint(1); if (player.GetField <int>("zombie_incantation") == 1) { attacker.Health = 1000; AfterDelay(100, () => { attacker.RadiusExploed(player.Origin); player.GamblerText("Incantation!", new Vector3(0, 0, 0), new Vector3(1, 1, 1), 1, 0); }); AfterDelay(200, () => attacker.Health = attacker.GetField <int>("maxhealth")); } } else { if (player.GetField <int>("incantation") == 1) { attacker.Health = 1000; AfterDelay(100, () => { attacker.RadiusExploed(player.Origin); player.GamblerText("Incantation!", new Vector3(0, 0, 0), new Vector3(1, 1, 1), 1, 0); }); AfterDelay(200, () => attacker.Health = attacker.GetField <int>("maxhealth")); } } }
public void OnSpawned(Entity player) { player.Call("freezecontrols", false); player.OnInterval(100, e => { if (player.GetField <int>("aiz_cash") >= 13000) { player.SetField("aiz_cash", 13000); } if (player.GetField <int>("aiz_point") >= 200) { player.SetField("aiz_point", 200); } return(player.IsAlive); }); player.SetField("speed", 1f); player.SetField("usingtelepot", 0); player.SetField("xpUpdateTotal", 0); if (player.GetTeam() == "allies") { PerkCola.ResetPerkCola(player); player.SetField("incantation", 0); player.Call("setviewmodel", "viewmodel_base_viewhands"); player.Call("clearperks"); player.SetPerk("specialty_assists", true, false); player.SetPerk("specialty_paint", true, false); player.SetPerk("specialty_paint_pro", true, false); } else if (player.GetTeam() == "axis") { player.SetField("zombie_incantation", 0); SetZombieModel(player); player.Call("clearperks"); player.SetPerk("specialty_falldamage", true, false); player.SetPerk("specialty_lightweight", true, false); player.SetPerk("specialty_longersprint", true, false); player.SetPerk("specialty_grenadepulldeath", true, false); player.SetPerk("specialty_fastoffhand", true, false); player.SetPerk("specialty_fastreload", true, false); player.SetPerk("specialty_paint", true, false); player.SetPerk("specialty_autospot", true, false); player.SetPerk("specialty_stalker", true, false); player.SetPerk("specialty_marksman", true, false); player.SetPerk("specialty_quickswap", true, false); player.SetPerk("specialty_quickdraw", true, false); player.SetPerk("specialty_fastermelee", true, false); player.SetPerk("specialty_selectivehearing", true, false); player.SetPerk("specialty_steadyaimpro", true, false); player.SetPerk("specialty_sitrep", true, false); player.SetPerk("specialty_detectexplosive", true, false); player.SetPerk("specialty_fastsprintrecovery", true, false); player.SetPerk("specialty_fastmeleerecovery", true, false); player.SetPerk("specialty_bulletpenetration", true, false); player.SetPerk("specialty_bulletaccuracy", true, false); } }