public Kill(CPlayerInfo cpKiller, CPlayerInfo cpVictim, string strDamageType, bool blHeadshot, Point3D pntKiller, Point3D pntVictim) { if ((this.Killer = cpKiller) == null) { this.Killer = new CPlayerInfo(); } if ((this.Victim = cpVictim) == null) { this.Victim = new CPlayerInfo(); } this.IsSuicide = (String.Compare(this.Killer.SoldierName, this.Victim.SoldierName) == 0); this.DamageType = strDamageType; this.Headshot = blHeadshot; this.KillerLocation = pntKiller; this.VictimLocation = pntVictim; this.TimeOfDeath = DateTime.Now; double dx = pntKiller.X - pntVictim.X; double dy = pntKiller.Y - pntVictim.Y; double dz = pntKiller.Z - pntVictim.Z; this.Distance = Math.Sqrt(dx * dx + dy * dy + dz * dz); }
public static List<string> ToStringList(Point3D[] points) { List<string> list = new List<string>(); foreach (Point3D point in points) { list.Add(point.X.ToString()); list.Add(point.Y.ToString()); list.Add(point.Z.ToString()); } return list; }
public void OnZoneTrespass(CPlayerInfo cpiSoldier, ZoneAction action, MapZone sender, Point3D pntTresspassLocation, float flTresspassPercentage, object trespassState) { if (flTresspassPercentage >= this.m_flMinimumTrespassError) { if (trespassState is Kill) { Kill trespassKill = (Kill)trespassState; // If the trespasser died within the zone (the killer does not need to be inside the zone) if (action == ZoneAction.Death) { if (trespassKill.IsSuicide == false) { // If the player was within the limit for base camping. // AND the player is not on the same team. if (trespassKill.Distance <= this.m_iMaximumDistanceForBaseCamping && trespassKill.Killer.TeamID != trespassKill.Victim.TeamID) { if (sender.Tags.Contains("EFAE_PROTECT_U.SARMY") == true) { // If the player was on U.S side // References: PRoCon.Core.CMap, PRoCon.Core.CTeamName if (String.Compare(this.GetTeamLocalizationKeyByTeamId(cpiSoldier.TeamID), "global.conquest.us", true) == 0) { this.KillPlayerWithMessage(trespassKill.Killer.SoldierName, this.m_strEfaeProtectUsArmyKillMessage.Replace("%kn%", trespassKill.Killer.SoldierName).Replace("%vn%", trespassKill.Victim.SoldierName)); } } if (sender.Tags.Contains("EFAE_PROTECT_RUSSIANARMY") == true) { if (String.Compare(this.GetTeamLocalizationKeyByTeamId(cpiSoldier.TeamID), "global.conquest.ru", true) == 0) { this.KillPlayerWithMessage(trespassKill.Killer.SoldierName, this.m_strEfaeProtectRussianArmyKillMessage.Replace("%kn%", trespassKill.Killer.SoldierName).Replace("%vn%", trespassKill.Victim.SoldierName)); } } if (sender.Tags.Contains("EFAE_PROTECT_NVA") == true) { if (String.Compare(this.GetTeamLocalizationKeyByTeamId(cpiSoldier.TeamID), "global.conquest.nva", true) == 0) { this.KillPlayerWithMessage(trespassKill.Killer.SoldierName, this.m_strEfaeProtectNVArmyKillMessage.Replace("%kn%", trespassKill.Killer.SoldierName).Replace("%vn%", trespassKill.Victim.SoldierName)); } } if (sender.Tags.Contains("EFAE_PROTECT_ATTACKERS") == true) { if (String.Compare(this.GetTeamLocalizationKeyByTeamId(cpiSoldier.TeamID), "global.rush.attackers", true) == 0) { this.KillPlayerWithMessage(trespassKill.Killer.SoldierName, this.m_strEfaeProtectAttackersKillMessage.Replace("%kn%", trespassKill.Killer.SoldierName).Replace("%vn%", trespassKill.Victim.SoldierName)); } } } } } // If the trespasser killed another player while inside the zone (the victim does not need to be inside the zone) else if (action == ZoneAction.Kill) { if (sender.Tags.Contains("EFAE_ANTICAMPER_SNIPER") == true) { // If they used a sniper rifle to kill. // References: PRoCon.Core.Players.Items.Weapon, PRoCon.Core.Players.Items.DamageTypes, PRoCon.Core.Players.Items.WeaponDictionary if (this.GetWeaponDamageType(trespassKill.DamageType) == DamageTypes.SniperRifle) { this.KillPlayerWithMessage(trespassKill.Killer.SoldierName, this.m_strEfaeAntiCamperSniperKillMessage.Replace("%kn%", trespassKill.Killer.SoldierName).Replace("%vn%", trespassKill.Victim.SoldierName)); } } } } } }
public void OnZoneTrespass(CPlayerInfo cpiSoldier, ZoneAction action, MapZone sender, Point3D pntTresspassLocation, float flTresspassPercentage) { }