Exemplo n.º 1
0
        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));
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
 private void MapGeometry_MapZoneTrespassed(CPlayerInfo cpiSoldier, ZoneAction action, MapZone sender, Point3D pntTresspassLocation, float flTresspassPercentage, object trespassState) {
     InvokeOnAllEnabled("OnZoneTrespass", new[] {cpiSoldier, action, sender, pntTresspassLocation, flTresspassPercentage, trespassState});
 }
Exemplo n.º 3
0
        public void OnZoneTrespass(CPlayerInfo cpiSoldier, ZoneAction action, MapZone sender, Point3D pntTresspassLocation, float flTresspassPercentage) {

        }