Results 1 to 3 of 3
  1. #1

    Insane limit request

    Looking for someone to modify or create a insane limit similar to the prohibit mobile aa, but instead of prohibiting it and kill on 1st I would like it to have a 3 strike rule, 1st time let them know there is only 3 kills in the mobile aa, 2nd warn them and the 3rd time kill the player and then killed for each kill after 3, I am wanting to limit the mobile aa to 3 kills per person, also I don't want this remembered so if a new game starts it will start fresh again at 1st warning. I tried the insane limit with the type @maa and would not like to do that every time, since its hard to remember who has killed in it and would have to tally people

    Thanks Much

  2. #2
    Im not a coder but I have this one working on my server , see if it works on yours

    Create a limit to evaluate OnKill, call it "Mobile AA Limit".

    Set first_check to this Code:

    Code:
    int kickCountLAV = 3;
    
    String warningMessage1 = "You reach 1 kills of 3 kills limit on the Mobile Anti Air! ";
    String warningMessage2 = "You reach 2 kills of 3 kills limit on the Mobile Anti Air! ";
    String kickMessage = "You reach 3 kills of 3 kills limit on the Mobile Anti Air! Use another vehicle!";
    
    if (!Regex.Match(kill.Weapon, @"(LAV_AD|Tunguska|PGZ-95)").Success) return false;
    
    
    if (killer.Name == victim.Name) return false;
    if (killer.Name == "Server") return false;
    
    String prefix = "LAVlimit_";
    String key = prefix + killer.Name;
    
    int count = 0;
    if (plugin.RoundData.issetInt(key)) count = plugin.RoundData.getInt(key);
    
    count = count + 1;
    
    plugin.RoundData.setInt(key, count);
    
    if (kickCountLAV < 1) kickCountLAV = 1;
    
    if (count >= kickCountLAV) {
    String tmp = "Killing " + killer.Name + " killed " + victim.Name + " with " + kill.Weapon + ", reason: " + kickMessage;
    plugin.ConsoleWrite(tmp);
    plugin.PRoConChat("Insane Limits > " + tmp);
    String tmp2 = "Killing " + killer.Name + " for reaching 3 kills limit on the Mobile Anti Air";
    plugin.SendGlobalMessage(killer.Name + ": " + tmp2);
    plugin.KillPlayer(killer.Name, 1);
    plugin.SendPlayerMessage(killer.Name, kickMessage);
    plugin.SendPlayerYell(killer.Name, kickMessage, 5);
    return false;
    }
    
    if (count == 1) {
    
           plugin.SendPlayerMessage(killer.Name, warningMessage1);
           plugin.PRoConChat("Insane Limits > " + killer.Name + ": " + warningMessage1);
           plugin.SendPlayerYell(killer.Name, warningMessage1, 5);
    }
    
    if (count == 2) {
    
           plugin.SendPlayerMessage(killer.Name, warningMessage2);
           plugin.PRoConChat("Insane Limits > " + killer.Name + ": " + warningMessage2);
           plugin.SendPlayerYell(killer.Name, warningMessage2, 5);
    }
    return false;

  3. #3
    Ok will give that a try, thank you much!!

    Quote Originally Posted by Tales View Post
    Im not a coder but I have this one working on my server , see if it works on yours

    Create a limit to evaluate OnKill, call it "Mobile AA Limit".

    Set first_check to this Code:

    Code:
    int kickCountLAV = 3;
    
    String warningMessage1 = "You reach 1 kills of 3 kills limit on the Mobile Anti Air! ";
    String warningMessage2 = "You reach 2 kills of 3 kills limit on the Mobile Anti Air! ";
    String kickMessage = "You reach 3 kills of 3 kills limit on the Mobile Anti Air! Use another vehicle!";
    
    if (!Regex.Match(kill.Weapon, @"(LAV_AD|Tunguska|PGZ-95)").Success) return false;
    
    
    if (killer.Name == victim.Name) return false;
    if (killer.Name == "Server") return false;
    
    String prefix = "LAVlimit_";
    String key = prefix + killer.Name;
    
    int count = 0;
    if (plugin.RoundData.issetInt(key)) count = plugin.RoundData.getInt(key);
    
    count = count + 1;
    
    plugin.RoundData.setInt(key, count);
    
    if (kickCountLAV < 1) kickCountLAV = 1;
    
    if (count >= kickCountLAV) {
    String tmp = "Killing " + killer.Name + " killed " + victim.Name + " with " + kill.Weapon + ", reason: " + kickMessage;
    plugin.ConsoleWrite(tmp);
    plugin.PRoConChat("Insane Limits > " + tmp);
    String tmp2 = "Killing " + killer.Name + " for reaching 3 kills limit on the Mobile Anti Air";
    plugin.SendGlobalMessage(killer.Name + ": " + tmp2);
    plugin.KillPlayer(killer.Name, 1);
    plugin.SendPlayerMessage(killer.Name, kickMessage);
    plugin.SendPlayerYell(killer.Name, kickMessage, 5);
    return false;
    }
    
    if (count == 1) {
    
           plugin.SendPlayerMessage(killer.Name, warningMessage1);
           plugin.PRoConChat("Insane Limits > " + killer.Name + ": " + warningMessage1);
           plugin.SendPlayerYell(killer.Name, warningMessage1, 5);
    }
    
    if (count == 2) {
    
           plugin.SendPlayerMessage(killer.Name, warningMessage2);
           plugin.PRoConChat("Insane Limits > " + killer.Name + ": " + warningMessage2);
           plugin.SendPlayerYell(killer.Name, warningMessage2, 5);
    }
    return false;

 

 

Posting Permissions

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