/// <summary>
 ///  This is the event handler for when the warhead stops counting down.
 /// </summary>
 public void OnStopCountdown(WarheadStopEvent ev)
 {
     if (ev.Activator == null)
     {
         Dictionary <string, string> variables = new Dictionary <string, string>
         {
             { "timeleft", ev.TimeLeft.ToString() }
         };
         this.plugin.SendMessage(Config.GetArray("channels.onstopcountdown.noplayer"), "environment.onstopcountdown.noplayer", variables);
     }
     else
     {
         Dictionary <string, string> variables = new Dictionary <string, string>
         {
             { "timeleft", ev.TimeLeft.ToString() },
             { "ipaddress", ev.Activator.IpAddress },
             { "name", ev.Activator.Name },
             { "playerid", ev.Activator.PlayerId.ToString() },
             { "steamid", ev.Activator.GetParsedUserID() },
             { "class", ev.Activator.TeamRole.Role.ToString() },
             { "team", ev.Activator.TeamRole.Team.ToString() }
         };
         this.plugin.SendMessage(Config.GetArray("channels.onstopcountdown.default"), "environment.onstopcountdown.default", variables);
     }
 }
Esempio n. 2
0
 public void OnStopCountdown(WarheadStopEvent ev)
 {
     if (GamemodeManager.GamemodeManager.GetCurrentMode().Equals(plugin))
     {
         ev.Cancel = false;
     }
 }
        public void OnStopCountdown(WarheadStopEvent ev)
        {
            /// <summary>
            ///  This is the event handler for when the warhead stops counting down.
            /// </summary>

            if (ev.Activator == null)
            {
                Dictionary <string, string> variables = new Dictionary <string, string>
                {
                    { "timeleft", ev.TimeLeft.ToString() }
                };
                plugin.SendMessage(Config.GetArray("channels.onstopcountdown.noplayer"), "environment.onstopcountdown.noplayer", variables);
            }
            else
            {
                Dictionary <string, string> variables = new Dictionary <string, string>
                {
                    { "timeleft", ev.TimeLeft.ToString() },
                    { "ipaddress", ev.Activator.IpAddress },
                    { "name", ev.Activator.Name },
                    { "playerid", ev.Activator.PlayerId.ToString() },
                    { "steamid", ev.Activator.SteamId },
                    { "class", ev.Activator.TeamRole.Role.ToString() },
                    { "team", ev.Activator.TeamRole.Team.ToString() }
                };
                plugin.SendMessage(Config.GetArray("channels.onstopcountdown.default"), "environment.onstopcountdown.default", variables);
            }
        }
Esempio n. 4
0
        public void OnStopCountdown(WarheadStopEvent ev)
        {
            if (cm.GetBoolValue("rank_enabled", true))
            {
                DBConnection db = new DBConnection(main);

                switch (ev.Activator.TeamRole.Team)
                {
                case Smod2.API.Team.CLASSD:
                    db.AddPoint(ev.Activator.SteamId, main.GetConfigInt("rank_point_nuke_stop_classd"));
                    break;

                case Smod2.API.Team.CHAOS_INSURGENCY:
                    db.AddPoint(ev.Activator.SteamId, main.GetConfigInt("rank_point_nuke_stop_ci"));
                    break;

                case Smod2.API.Team.NINETAILFOX:
                    db.AddPoint(ev.Activator.SteamId, main.GetConfigInt("rank_point_nuke_stop_ntf"));
                    break;

                case Smod2.API.Team.SCIENTIST:
                    db.AddPoint(ev.Activator.SteamId, main.GetConfigInt("rank_point_nuke_stop_scient"));
                    break;

                case Smod2.API.Team.SCP:
                    db.AddPoint(ev.Activator.SteamId, main.GetConfigInt("rank_point_nuke_stop_scp"));
                    break;
                }
            }
        }
 public void OnStopCountdown(WarheadStopEvent ev)
 {
     /// <summary>
     ///  This is the event handler for when the warhead stops counting down.
     /// </summary>
     plugin.SendMessageAsync(plugin.GetConfigString("discord_channel_onstopcountdown"), plugin.MultiLanguage(45));
 }
Esempio n. 6
0
 void IEventHandlerWarheadStopCountdown.OnStopCountdown(WarheadStopEvent ev)
 {
     send(ev, new IdMapping()
          .appendId(Lib.EVENT_ACTIVATOR_ID, ev.Activator)
          .appendId(Lib.EVENT_ACTIVATOR_SCPDATA_ID, ev.Activator.Scp079Data)
          .appendId(Lib.EVENT_ACTIVATOR_TEAMROLE_ID, ev.Activator.TeamRole)
          );
 }
Esempio n. 7
0
 public void OnStopCountdown(WarheadStopEvent ev)
 {
     if (ev.Activator != null)
     {
         if (Is343(ev.Activator))
         {
             if (_343Config.Nuke_Interact)
             {
                 ev.Cancel = false;
             }
             else
             {
                 ev.Cancel = true;
             }
         }
     }
 }
Esempio n. 8
0
        public void OnStopCountdown(WarheadStopEvent ev)
        {
            /// <summary>
            ///  This is the event handler for when the warhead stops counting down.
            /// </summary>
            Dictionary <string, string> variables = new Dictionary <string, string>
            {
                { "timeleft", ev.TimeLeft.ToString() },
                { "ipaddress", ev.Activator.IpAddress },
                { "name", ev.Activator.Name },
                { "playerid", ev.Activator.PlayerId.ToString() },
                { "steamid", ev.Activator.SteamId },
                { "class", ev.Activator.TeamRole.Role.ToString() },
                { "team", ev.Activator.TeamRole.Team.ToString() }
            };

            plugin.SendMessageToBot(plugin.GetConfigString("discord_channel_onstopcountdown"), "environment.onstopcountdown", variables);
        }
 public void OnStopCountdown(WarheadStopEvent ev)
 {
     ulck.Enabled = false;
 }
Esempio n. 10
0
 public void OnStopCountdown(WarheadStopEvent ev)
 {
     plugin.luaHookCall.Function.Call("OnStopCountdown", ev.Activator, ev.Cancel, ev.TimeLeft);
 }