Results 1 to 4 of 4
  1. #1
    Procon Addict
    Join Date
    Sep 2010
    Location
    Burton On Trent Staffordshire UK
    Posts
    579

    Using papa's warn once then kick insane limit

    Im using papa charlie's insane limit he made a couple of years ago, (no rocket on soldier) The code got lost when our procon went down but i cant for the hell of me remember how to install it at the moment i get

    [11:04:10] ADMIN > Attention xALEXx17! Do not use CZ805!
    [11:04:11] ADMIN > Attention sN_Slowhand! Do not use M416!
    [11:04:11] AdKats > aquleas1 just joined this server group for the first time!
    [11:04:11] ADMIN > Attention Epoxi! Do not use AEK971!
    [11:04:15] ADMIN > Attention LucienTV! Do not use M67!
    [11:04:16] ADMIN > Attention Raymanbrother! Do not use CS-LR4

    Code:
    ( Regex.Match(kill.Weapon, @"(U_RPG7|U_SMAW|)", RegexOptions.IgnoreCase).Success )
    
    
    
    /* Version: V0.8/R2 */
    String kCounter = killer.Name + "_TreatAsOne_Count";
    TimeSpan time = TimeSpan.FromSeconds(5); // Activations within 5 seconds count as 1
    
    int warnings = 0;
    if (server.Data.issetInt(kCounter)) warnings = server.Data.getInt(kCounter);
    
    //plugin.ConsoleWrite("^b[No Rockets]^n (" + killer.FullName + ") warnings = " + warnings);
        
    /*
    The first time through, warnings is zero. Whether this is an isolated
    activation or the first of a sequence of activations in a short period
    of time, do something on this first time through.
    */
    String msg = "none";
    if (warnings == 0) {
            msg = plugin.R("Attention %k_n%! Do not use %w_n%!");
            plugin.SendGlobalMessage(msg);
            plugin.PRoConChat("ADMIN > " + msg);
            server.Data.setInt(kCounter, warnings+1);
            return false;
    }
    
    /*
    The second and subsequent times through, check to make sure we are not
    getting multiple activations in a short period of time. Ignore if
    less than the time span required.
    */
    
    if (limit.Activations(killer.Name, time) > 1) return false;
    
    /*
    We get here only if there was exactly one activation in the time span
    */
    
    if (warnings == 1) {
            msg = plugin.R("FINAL WARNING %k_n%! Do not use %w_n%!");
            plugin.SendGlobalMessage(msg);
            plugin.PRoConChat("ADMIN > " + msg);
    } else if (warnings >= 2) {
            msg = plugin.R("Kicking %k_n% for ignoring warnings and killing with %w_n%!");
            plugin.SendSquadMessage(killer.TeamId, killer.SquadId, msg);
            plugin.PRoConChat("ADMIN > " + msg);
            plugin.PRoConEvent(msg, "Insane Limits");
            plugin.KickPlayerWithMessage(killer.Name, msg);
    }
    server.Data.setInt(kCounter, warnings+1);
    return false;
    Thanks in advance
    Attached Images Attached Images

  2. #2
    Procon Addict
    Join Date
    Dec 2013
    Location
    Sydney, Australia
    Posts
    502
    Looking at both the code and the attached screenshot, it appears to actually be installed correctly, except it looks like there's an extra | in the first_check Expression:
    Code:
    ( Regex.Match(kill.Weapon, @"(U_RPG7|U_SMAW|)", RegexOptions.IgnoreCase).Success )
    Try:
    Code:
    ( Regex.Match(kill.Weapon, @"(U_RPG7|U_SMAW)", RegexOptions.IgnoreCase).Success )

  3. #3
    Procon Addict
    Join Date
    Sep 2010
    Location
    Burton On Trent Staffordshire UK
    Posts
    579
    ah i think you have it .. thanks so much i will try and report back

    yes it was that thanks so much
    Last edited by EntraVenuS; 07-02-2015 at 14:12.

  4. #4
    Don't send me private messages (PMs) unless you really need privacy, like your game server password. If you just have a question or need help, post in one of the threads. It's extra work for me to answer questions and give help in private messages and no one else gets the benefit of the answer.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •