Jump to content

Insane Limits Requests


ImportBot

Recommended Posts

  • Replies 3.2k
  • Created
  • Last Reply

Originally Posted by PapaCharlie9*:

 

Yeah, it's not. Votes can get started, but it doesn't register !yes or !no votes anymore. Since last BF update. Try it out for yourself.

 

Papacharlie's work is solid though, and don't really need an entire plugin for it. A Papacharlie limit would be preferred.

A Papacharlie limit is gonna be just as broke as everyone elses, until we understand what changed. :smile:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

They already exist. ...* and ...*.

I tested the VoteKick limit on my unranked R28 server and it worked fine. I don't use a layer, though.

 

pharbehind, have you actually tried the limit to see if it works? If it doesn't work, post the console.log. I want to see what happens when people type @votekick or !votekick.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BTFU_Maverick*:

 

Hey guys Im trying to work out the code on a limit I write for various admin commands and Im now sure how to get the Regex.Match to evaluate against several things. For example, I want admins to be able to send a GlobalMessage using !ss or !say. Right now I have it set up for just !ss and it works like follows:

 

String sayCmd = @"!ss";

try {

sayMatch = Regex.Match(player.LastChat, @"^\s*" + sayCmd + @"([0-9]+)_\s+(.*)$", RegexOptions.IgnoreCase);

} catch (Exception e) {

plugin.ConsoleError("^b^1[Admin Command]^0^n bad regex syntax! " + e);

return false;

}

 

and from there I use the match to execute the commands on down the road. That works fine just like that. Now I want to be able to add

 

String sayCmd2 = @"!say";

 

and have the 'try' above evaluate against both sayCmd and sayCmd2. Can I do this without writing in whole new Matches for every command I want to create duplicate commands for?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by pharbehind*:

 

I tested the VoteKick limit on my unranked R28 server and it worked fine. I don't use a layer, though.

 

pharbehind, have you actually tried the limit to see if it works? If it doesn't work, post the console.log. I want to see what happens when people type @votekick or !votekick.

I'll try it again, gimme a couple days.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

Dictionaries do have a size limit, but the point is that by using dictionaries and data, you write less code. If you write less code, your source code is smaller, which should get you under the maximum source code size for a limit.

 

The maximum limit source code size is approximately 49140 characters (UTF-16) or about 98280 bytes. That's per first_check or second_check.

ok i am still on the same metro (all activations in 5 seconds counted as one).

 

these are the dictionaries i created

 

http://www.codesend.com/view/4a4f2a7...789f3e2cd2f3b/

 

and this is the code that can use those dictionaries

 

http://www.codesend.com/view/00c24a1...8818e45eedce8/

 

if i put them together it is like 56k characters. any solution ? XD

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Singh400*:

 

I don't understand when you've got the dictionaries split by language when they are all in English anyway? And you have to ask yourself with the time you are putting into this will this really benefit your server?

 

PS, Played on your server last night, it was crazy!

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

I don't understand when you've got the dictionaries split by language when they are all in English anyway? And you have to ask yourself with the time you are putting into this will this really benefit your server?

 

PS, Played on your server last night, it was crazy!

what was crazy ?

 

there is no benefit. just free time.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

I don't understand when you've got the dictionaries split by language when they are all in English anyway?

The English messages are just placeholders. He wants to get the code right before doing the translations.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Hey guys Im trying to work out the code on a limit I write for various admin commands and Im now sure how to get the Regex.Match to evaluate against several things. For example, I want admins to be able to send a GlobalMessage using !ss or !say. Right now I have it set up for just !ss and it works like follows:

 

String sayCmd = @"!ss";

try {

sayMatch = Regex.Match(player.LastChat, @"^\s*" + sayCmd + @"([0-9]+)_\s+(.*)$", RegexOptions.IgnoreCase);

} catch (Exception e) {

plugin.ConsoleError("^b^1[Admin Command]^0^n bad regex syntax! " + e);

return false;

}

 

and from there I use the match to execute the commands on down the road. That works fine just like that. Now I want to be able to add

 

String sayCmd2 = @"!say";

 

and have the 'try' above evaluate against both sayCmd and sayCmd2. Can I do this without writing in whole new Matches for every command I want to create duplicate commands for?

To match multiple patterns, use grouping syntax, e.g., (_:ss|say)

 

String sayCmd = @"!(_:ss|say)";

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

ok i am still on the same metro (all activations in 5 seconds counted as one).

 

these are the dictionaries i created

 

http://www.codesend.com/view/4a4f2a7...789f3e2cd2f3b/

 

and this is the code that can use those dictionaries

 

http://www.codesend.com/view/00c24a1...8818e45eedce8/

 

if i put them together it is like 56k characters. any solution ? XD

You didn't change the getBool to player.CountryCode as I suggested. That will save you a ton of code.

 

Instead of this:

 

Code:

foreach (PlayerInfoInterface p in all) {
 
    if (p.Data.getBool("ENG")) {
        plugin.ServerCommand("admin.yell", FirWeapon["ENG"], "30", "player", p.Name);        
    } else if (p.Data.getBool("FR")) {
        plugin.ServerCommand("admin.yell", FirWeapon["FR"], "30", "player", p.Name);
    } else if (p.Data.getBool("GE")) {
        plugin.ServerCommand("admin.yell", FirWeapon["GE"], "30", "player", p.Name);
    } else if (p.Data.getBool("SP")) {
        plugin.ServerCommand("admin.yell", FirWeapon["SP"], "30", "player", p.Name);
    }else if (p.Data.getBool("IT")) {
        plugin.ServerCommand("admin.yell", FirWeapon["IT"], "30", "player", p.Name);
    }else if (p.Data.getBool("PO")) {
        plugin.ServerCommand("admin.yell", FirWeapon["PO"], "30", "player", p.Name);
    }else if (p.Data.getBool("SW")) {
        plugin.ServerCommand("admin.yell", FirWeapon["SW"], "30", "player", p.Name);
    }else if (p.Data.getBool("RU")) {
        plugin.ServerCommand("admin.yell", FirWeapon["RU"], "30", "player", p.Name);
    }else if (p.Data.getBool("DA")) {
        plugin.ServerCommand("admin.yell", FirWeapon["DA"], "30", "player", p.Name);
    }
    }
do this:

 

Code:

foreach (PlayerInfoInterface p in all) {
      String lang = p.CountryCode;
      if (!FirWeapon.ContainsKey(lang)) lang = "ENG";
      plugin.ServerCommand("admin.yell", FirWeapon[lang], "30", "player", p.Name);
    }
See? Much shorter. You can get rid of your player.Data.setBool("ENG", true) code, etc., you don't need it. Just use the CountryCode value directly. But always test for ContainsKey in case a player has a code you don't have in your dictionary. Use the pattern I used above, if ! (not) ContainsKey, force lang to be "ENG".
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Singh400*:

 

To execute a condition on every Nth, use the modulus (integer remainder) operator %. For example, this would do something every 5th (0, 5, 10, 15, 20, ...)

 

Code:

if (count % 5 == 0) {
   .... do something every 5th
}
This is because any integer divided by 5 that has 0 as the remainder has to be a multiple of 5, thus, every fifth. Just keep in mind that (0 % N == 0) will be true, so if you don't want to include 0, you have to exclude it with another clause:

 

Code:

if ((count % 5) == 0 && count != 0) ...
The same holds true if I want to do something every 3rd, 14th or 27th right? I just change the 5 to 3, 14 or 27 right?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by EBassie*:

 

The constant sustained gunfire with no explosives. It was kind of eerie.

Not to mention the continuous votekicks and votebans to get rid of a cheater and some glitchers :ohmy:

Singh400, it was a weird round yesterday. :biggrin:

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

You didn't change the getBool to player.CountryCode as I suggested. That will save you a ton of code.

 

Instead of this:

 

Code:

foreach (PlayerInfoInterface p in all) {
 
    if (p.Data.getBool("ENG")) {
        plugin.ServerCommand("admin.yell", FirWeapon["ENG"], "30", "player", p.Name);        
    } else if (p.Data.getBool("FR")) {
        plugin.ServerCommand("admin.yell", FirWeapon["FR"], "30", "player", p.Name);
    } else if (p.Data.getBool("GE")) {
        plugin.ServerCommand("admin.yell", FirWeapon["GE"], "30", "player", p.Name);
    } else if (p.Data.getBool("SP")) {
        plugin.ServerCommand("admin.yell", FirWeapon["SP"], "30", "player", p.Name);
    }else if (p.Data.getBool("IT")) {
        plugin.ServerCommand("admin.yell", FirWeapon["IT"], "30", "player", p.Name);
    }else if (p.Data.getBool("PO")) {
        plugin.ServerCommand("admin.yell", FirWeapon["PO"], "30", "player", p.Name);
    }else if (p.Data.getBool("SW")) {
        plugin.ServerCommand("admin.yell", FirWeapon["SW"], "30", "player", p.Name);
    }else if (p.Data.getBool("RU")) {
        plugin.ServerCommand("admin.yell", FirWeapon["RU"], "30", "player", p.Name);
    }else if (p.Data.getBool("DA")) {
        plugin.ServerCommand("admin.yell", FirWeapon["DA"], "30", "player", p.Name);
    }
    }
do this:

 

Code:

foreach (PlayerInfoInterface p in all) {
      String lang = p.CountryCode;
      if (!FirWeapon.ContainsKey(lang)) lang = "ENG";
      plugin.ServerCommand("admin.yell", FirWeapon[lang], "30", "player", p.Name);
    }
See? Much shorter. You can get rid of your player.Data.setBool("ENG", true) code, etc., you don't need it. Just use the CountryCode value directly. But always test for ContainsKey in case a player has a code you don't have in your dictionary. Use the pattern I used above, if ! (not) ContainsKey, force lang to be "ENG".
can it be something other than country code ? something we can specify ourself. because for example danish is spoken by multiple countries...

 

 

The constant sustained gunfire with no explosives. It was kind of eerie.

don't you love PKP :P
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

can it be something other than country code ? something we can specify ourself. because for example danish is spoken by multiple countries...

Yes.

 

Instead of CountryCode, define a kLanguage key:

 

Code:

String kLanguage = "Language";
Then set it on every player as a String, similar to how you did setBool:

 

Code:

player.Data.setString(kLanguage, "ENG");
Then the code to send the chat message becomes:

 

Code:

foreach (PlayerInfoInterface p in all) {
      String lang = p.Data.getString(kLanguage);
      if (!FirWeapon.ContainsKey(lang)) lang = "ENG";
      plugin.ServerCommand("admin.yell", FirWeapon[lang], "30", "player", p.Name);
    }
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

Yes.

 

Instead of CountryCode, define a kLanguage key:

 

Code:

String kLanguage = "Language";
Then set it on every player as a String, similar to how you did setBool:

 

Code:

player.Data.setString(kLanguage, "ENG");
Then the code to send the chat message becomes:

 

Code:

foreach (PlayerInfoInterface p in all) {
      String lang = p.Data.getString(kLanguage);
      if (!FirWeapon.ContainsKey(lang)) lang = "ENG";
      plugin.ServerCommand("admin.yell", FirWeapon[lang], "30", "player", p.Name);
    }
from 59k characters to 27k characters, what kind of sorcery is this ?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by dyn*:

 

Looking for a way to limit hackusations on our server. Ideally I'd want players to report their hackusations to us directly instead of spamming the chat with 'so and so is hacking' all the time. Today on just one of our servers we had some form of hacker, hack, aimbot, cheater, etc mentioned over 100 times. While I really don't care about the occasional 'hacker' callout it does get frustrating when 1 or 2 users feel it necessary to call out everyone each time they are killed. This, of course, sets off the admin alterter plugin that many of our admins use.

 

Since their isn't a way to mute players (thanks, DICE), I'm thinking of a private warning psay / yell to the accuser. If they ignore the warnings and continue to spout on about hackers they are admin killed, then kicked (or temp banned) from the server.

 

If it's possible to retain the information between rounds that would be ideal.

 

BadPlayer yells 'hacker' then 'aimbot' on another line.

User has now used his 2 free hackusations for the next 1 hour. User is warned and told to contact an admin.

BadPlayer yells "hacker"

User is now punished with admin kill.

If BadPlayer says any of the keywords during the next 1 hour they are removed from the server (temp banned / kicked).

 

Thank you in advance if anyone is able to come up with a solution.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

Looking for a way to limit hackusations on our server. Ideally I'd want players to report their hackusations to us directly instead of spamming the chat with 'so and so is hacking' all the time. Today on just one of our servers we had some form of hacker, hack, aimbot, cheater, etc mentioned over 100 times. While I really don't care about the occasional 'hacker' callout it does get frustrating when 1 or 2 users feel it necessary to call out everyone each time they are killed. This, of course, sets off the admin alterter plugin that many of our admins use.

 

Since their isn't a way to mute players (thanks, DICE), I'm thinking of a private warning psay / yell to the accuser. If they ignore the warnings and continue to spout on about hackers they are admin killed, then kicked (or temp banned) from the server.

 

If it's possible to retain the information between rounds that would be ideal.

 

BadPlayer yells 'hacker' then 'aimbot' on another line.

User has now used his 2 free hackusations for the next 1 hour. User is warned and told to contact an admin.

BadPlayer yells "hacker"

User is now punished with admin kill.

If BadPlayer says any of the keywords during the next 1 hour they are removed from the server (temp banned / kicked).

 

Thank you in advance if anyone is able to come up with a solution.

i think there was an example in the old examples thread. not sure though.

 

for me i just ignore bad player cries.

 

 

in the !m26 complaint limit i have this issue

 

Code:

[16:44:26 48] [Insane Limits] ERROR: (CS1519, line: 544, column: 13):  Invalid token 'catch' in class, struct, or interface member declaration
[16:44:26 48] [Insane Limits] ERROR: (CS1002, line: 544, column: 30):  ; expected
[16:44:26 48] [Insane Limits] ERROR: (CS1519, line: 546, column: 37):  Invalid token '(' in class, struct, or interface member declaration
[16:44:26 48] [Insane Limits] ERROR: (CS1519, line: 546, column: 39):  Invalid token ',' in class, struct, or interface member declaration
[16:44:26 48] [Insane Limits] ERROR: (CS1520, line: 546, column: 46):  Class, struct, or interface method must have a return type
[16:44:26 48] [Insane Limits] ERROR: (CS1002, line: 546, column: 55):  ; expected
[16:44:26 48] [Insane Limits] ERROR: (CS1519, line: 546, column: 60):  Invalid token ')' in class, struct, or interface member declaration
[16:44:26 48] [Insane Limits] ERROR: (CS0116, line: 548, column: 13):  A namespace does not directly contain members such as fields or methods
[16:44:26 48] [Insane Limits] ERROR: (CS1518, line: 551, column: 16):  Expected class, delegate, enum, interface, or struct
[16:44:26 48] [Insane Limits] ERROR: (CS1022, line: 564, column: 5):  Type or namespace definition, or end-of-file expected
this is a dump where i highlighted the lines according to the error

 

Code:

            return false;
            return false;
            }
            catch(Exception e)
            {
                plugin.DumpException(e, this.GetType().Name);
            }
            return false;
        }

        public bool SecondCheck(PlayerInfoInterface player, ServerInfoInterface server, PluginInterface plugin, TeamInfoInterface team1, TeamInfoInterface team2, TeamInfoInterface team3, TeamInfoInterface team4, LimitInfoInterface limit)
        {
            try
            {
            
            return true;
            }
            catch(Exception e)
            {
               plugin.DumpException(e, this.GetType().Name);
            }
            return true;
        }
    }  
}
this is the original limit

 

Code:

/* Version 0.8/R2 */
/* CUSTOMIZE: */
int requiredComplaints = 3; // required number of complaints to punish, must be 3+
int maxTimeToComplainSecs = 5*60; // maximum amount of time since suspect death to complain
String adminList = "admin_list"; // Name of custom list for admin names
String adminTags = "admin_tags"; // Name of custom list for admin tags

String kKillWeap = "Complaint_killWeap"; // player.RoundData String
String kKillName = "Complaint_killName"; // player.RoundData String
String kKillTime = "Complaint_killTime"; // player.RoundData Object (DateTime)
String kComplaintsM26 = "Complaint_M26"; // plugin.RoundData Object (Dictionary<String,List<String>>)
String kComplaintsM320 = "Complaint_M320"; // plugin.RoundData Object (Dictionary<String,List<String>>)
String kPunished = "Complaint_punished_"; // plugin.RoundData String (prefix)

bool isM26 = Regex.Match(player.LastChat, @"^\s*!(_:m26|dart|mass)", RegexOptions.IgnoreCase).Success; // CUSTOMIZE to disable
bool isM320 = Regex.Match(player.LastChat, @"^\s*!(_:m320|gp-_30)", RegexOptions.IgnoreCase).Success; // CUSTOMIZE to disable
bool isComplaints = Regex.Match(player.LastChat, @"^\s*!(_:complain|comps)", RegexOptions.IgnoreCase).Success;

Dictionary<String,String> reminderm26 = new Dictionary<String,String>();
reminderm26["ENG"] = "Type '!m26' if you are killed by an M26 exploiter";
reminderm26["FR"] = "Type '!m26' if you are killed by an M26 exploiter";
reminderm26["GE"] = "Type '!m26' if you are killed by an M26 exploiter";
reminderm26["SP"] = "Type '!m26' if you are killed by an M26 exploiter";
reminderm26["IT"] = "Type '!m26' if you are killed by an M26 exploiter";
reminderm26["PO"] = "Type '!m26' if you are killed by an M26 exploiter";
reminderm26["SW"] = "Type '!m26' if you are killed by an M26 exploiter";
reminderm26["RU"] = "Type '!m26' if you are killed by an M26 exploiter";
reminderm26["DA"] = "Type '!m26' if you are killed by an M26 exploiter";

Dictionary<String,String> reminderm320 = new Dictionary<String,String>();
reminderm320["ENG"] = "Type '!m320' if you are killed by M320/GP-30";
reminderm320["FR"] = "Type '!m320' if you are killed by M320/GP-30";
reminderm320["GE"] = "Type '!m320' if you are killed by M320/GP-30";
reminderm320["SP"] = "Type '!m320' if you are killed by M320/GP-30";
reminderm320["IT"] = "Type '!m320' if you are killed by M320/GP-30";
reminderm320["PO"] = "Type '!m320' if you are killed by M320/GP-30";
reminderm320["SW"] = "Type '!m320' if you are killed by M320/GP-30";
reminderm320["RU"] = "Type '!m320' if you are killed by M320/GP-30";
reminderm320["DA"] = "Type '!m320' if you are killed by M320/GP-30";

String kLanguage = "Language";

int hour = DateTime.Now.Hour;
List<PlayerInfoInterface> all = new List<PlayerInfoInterface>();
all.AddRange(team1.players);
all.AddRange(team2.players);
if (team3.players.Count > 0) all.AddRange(team3.players);
if (team4.players.Count > 0) all.AddRange(team4.players);

if (!isM26 && !isM320 && !isComplaints) {
    String lang = player.Data.getString(kLanguage);
    if (!FirKill.ContainsKey(lang)) lang = "ENG";
	if (Regex.Match(player.LastChat, @"(_:m26|dart|mass|buck)", RegexOptions.IgnoreCase).Success) {
		plugin.ServerCommand("admin.say", reminderm26[lang], "player", player.Name);
		plugin.ServerCommand("admin.yell", reminderm26[lang], "10", "player", player.Name);
	} else if (Regex.Match(player.LastChat, @"(_:m320|gp._30|tube|toob)", RegexOptions.IgnoreCase).Success) {
		plugin.ServerCommand("admin.say", reminderm320[lang], "player", player.Name);
		plugin.ServerCommand("admin.yell", reminderm320[lang], "10", "player", player.Name);
	}
	return false;
}

int level = 2;

try {
	level = Convert.ToInt32(plugin.getPluginVarValue("debug_level"));
} catch (Exception e) {}

String msg = null;
Dictionary<String,List<String>> complaints = null;
String suspectWeap = "M26";

Action<String> ChatPlayer = delegate(String txt) {
	plugin.ServerCommand("admin.say", txt, "player", player.Name);
	if (level >= 3) plugin.ConsoleWrite("^b[Complaint]^n " + player.FullName + " was told: " + txt);
};

Converter<PlayerInfoInterface, String> ExtractTag = delegate(PlayerInfoInterface xx) {
	String tag = xx.Tag;
	if (String.IsNullOrEmpty(tag)) {
		// Maybe they are using [_-=]XXX[=-_]PlayerName format
		Match tm = Regex.Match(xx.Name, @"^[=_\-]_([^=_\-]{2,4})[=_\-]");
		if (tm.Success) {
			tag = tm.Groups[1].Value;
		} else {
			tag = "no tag";
		}
	}
	return tag;
};

/* Sanity check configuration */

if (requiredComplaints < 3) {
	plugin.ConsoleError("^b[Complaint]^n requiredComplaints must be 3 or more, coded value is " + requiredComplaints);
	requiredComplaints = 3;
}

/* Check for admin request for list of complaints */

if (isComplaints) {
	String playerTag = ExtractTag(player);
	if (!plugin.isInList(player.Name, adminList) && !plugin.isInList(playerTag, adminTags)) {
        if (player.Data.getBool("ENG")) {
            ChatPlayer("You are not authorized to use the !complaints command");
        } else if (player.Data.getBool("FR")) {
            ChatPlayer("You are not authorized to use the !complaints command");
        } else if (player.Data.getBool("GE")) {
            ChatPlayer("You are not authorized to use the !complaints command");
        } else if (player.Data.getBool("SP")) {
            ChatPlayer("You are not authorized to use the !complaints command");
        } else if (player.Data.getBool("IT")) {
            ChatPlayer("You are not authorized to use the !complaints command");
        } else if (player.Data.getBool("PO")) {
            ChatPlayer("You are not authorized to use the !complaints command");
        } else if (player.Data.getBool("SW")) {
            ChatPlayer("You are not authorized to use the !complaints command");
        } else if (player.Data.getBool("RU")) {
            ChatPlayer("You are not authorized to use the !complaints command");
        } else if (player.Data.getBool("DA")) {
            ChatPlayer("You are not authorized to use the !complaints command");
        }
		return false;
	}
	Match m320Match = Regex.Match(player.LastChat, @"^\s*!(_:complain|comps).*\s+m320", RegexOptions.IgnoreCase);
	String whichList = kComplaintsM26; // M26 if no match to M320
	if (m320Match.Success) {
		whichList = kComplaintsM320;
		suspectWeap = "M320";
	}
	
	if (level >= 2) plugin.ConsoleWrite("^b[Complaint]^n " + player.FullName + " used command: " + player.LastChat);
	
	if (!plugin.RoundData.issetObject(whichList)) {
        if (player.Data.getBool("ENG")) {
            ChatPlayer("No complaints lodged against " + suspectWeap + " yet");
        } else if (player.Data.getBool("FR")) {
            ChatPlayer("No complaints lodged against " + suspectWeap + " yet");
        } else if (player.Data.getBool("GE")) {
            ChatPlayer("No complaints lodged against " + suspectWeap + " yet");
        } else if (player.Data.getBool("SP")) {
            ChatPlayer("No complaints lodged against " + suspectWeap + " yet");
        } else if (player.Data.getBool("IT")) {
            ChatPlayer("No complaints lodged against " + suspectWeap + " yet");
        } else if (player.Data.getBool("PO")) {
            ChatPlayer("No complaints lodged against " + suspectWeap + " yet");
        } else if (player.Data.getBool("SW")) {
            ChatPlayer("No complaints lodged against " + suspectWeap + " yet");
        } else if (player.Data.getBool("RU")) {
            ChatPlayer("No complaints lodged against " + suspectWeap + " yet");
        } else if (player.Data.getBool("DA")) {
            ChatPlayer("No complaints lodged against " + suspectWeap + " yet");
        }
		return false;
	}
	
	complaints = (Dictionary<String,List<String>>)plugin.RoundData.getObject(whichList);
	
	if (complaints.Count == 0) {
        if (player.Data.getBool("ENG")) {
            ChatPlayer("No players with complaints for using " + suspectWeap);
        } else if (player.Data.getBool("FR")) {
            ChatPlayer("No players with complaints for using " + suspectWeap);
        } else if (player.Data.getBool("GE")) {
            ChatPlayer("No players with complaints for using " + suspectWeap);
        } else if (player.Data.getBool("SP")) {
            ChatPlayer("No players with complaints for using " + suspectWeap);
        } else if (player.Data.getBool("IT")) {
            ChatPlayer("No players with complaints for using " + suspectWeap);
        } else if (player.Data.getBool("PO")) {
            ChatPlayer("No players with complaints for using " + suspectWeap);
        } else if (player.Data.getBool("SW")) {
            ChatPlayer("No players with complaints for using " + suspectWeap);
        } else if (player.Data.getBool("RU")) {
            ChatPlayer("No players with complaints for using " + suspectWeap);
        } else if (player.Data.getBool("DA")) {
            ChatPlayer("No players with complaints for using " + suspectWeap);
        }
		return false;
	}
	
	        if (player.Data.getBool("ENG")) {
            ChatPlayer(complaints.Count + " players with complaints for using " + suspectWeap);
        } else if (player.Data.getBool("FR")) {
            ChatPlayer(complaints.Count + " players with complaints for using " + suspectWeap);
        } else if (player.Data.getBool("GE")) {
            ChatPlayer(complaints.Count + " players with complaints for using " + suspectWeap);
        } else if (player.Data.getBool("SP")) {
            ChatPlayer(complaints.Count + " players with complaints for using " + suspectWeap);
        } else if (player.Data.getBool("IT")) {
            ChatPlayer(complaints.Count + " players with complaints for using " + suspectWeap);
        } else if (player.Data.getBool("PO")) {
            ChatPlayer(complaints.Count + " players with complaints for using " + suspectWeap);
        } else if (player.Data.getBool("SW")) {
            ChatPlayer(complaints.Count + " players with complaints for using " + suspectWeap);
        } else if (player.Data.getBool("RU")) {
            ChatPlayer(complaints.Count + " players with complaints for using " + suspectWeap);
        } else if (player.Data.getBool("DA")) {
            ChatPlayer(complaints.Count + " players with complaints for using " + suspectWeap);
        }
		return false;
	}
	
	bool showAll = true;
	if (requiredComplaints > 3 && complaints.Count > 5) {
        if (player.Data.getBool("ENG")) {
            ChatPlayer("Players with more than 2 complaints:");
        } else if (player.Data.getBool("FR")) {
            ChatPlayer("Players with more than 2 complaints:");
        } else if (player.Data.getBool("GE")) {
            ChatPlayer("Players with more than 2 complaints:");
        } else if (player.Data.getBool("SP")) {
            ChatPlayer("Players with more than 2 complaints:");
        } else if (player.Data.getBool("IT")) {
            ChatPlayer("Players with more than 2 complaints:");
        } else if (player.Data.getBool("PO")) {
            ChatPlayer("Players with more than 2 complaints:");
        } else if (player.Data.getBool("SW")) {
            ChatPlayer("Players with more than 2 complaints:");
        } else if (player.Data.getBool("RU")) {
            ChatPlayer("Players with more than 2 complaints:");
        } else if (player.Data.getBool("DA")) {
            ChatPlayer("Players with more than 2 complaints:");
        }
		showAll = false;
	}
	
	foreach (KeyValuePair<String,List<String>> comp in complaints) {
		if (showAll || comp.Value.Count > 2) {
			int oldLevel = level;
			level = 2;
			if (player.Data.getBool("ENG")) {
                ChatPlayer(comp.Key + ": " + comp.Value.Count + " complaints");
            } else if (player.Data.getBool("FR")) {
                ChatPlayer(comp.Key + ": " + comp.Value.Count + " complaints");
            } else if (player.Data.getBool("GE")) {
                ChatPlayer(comp.Key + ": " + comp.Value.Count + " complaints");
            } else if (player.Data.getBool("SP")) {
                ChatPlayer(comp.Key + ": " + comp.Value.Count + " complaints");
            } else if (player.Data.getBool("IT")) {
                ChatPlayer(comp.Key + ": " + comp.Value.Count + " complaints");
            } else if (player.Data.getBool("PO")) {
                ChatPlayer(comp.Key + ": " + comp.Value.Count + " complaints");
            } else if (player.Data.getBool("SW")) {
                ChatPlayer(comp.Key + ": " + comp.Value.Count + " complaints");
            } else if (player.Data.getBool("RU")) {
                ChatPlayer(comp.Key + ": " + comp.Value.Count + " complaints");
            } else if (player.Data.getBool("DA")) {
                ChatPlayer(comp.Key + ": " + comp.Value.Count + " complaints");
            }
			level = oldLevel;
		} else if (level >= 2) {
			plugin.ConsoleWrite("^b[Complaint]^n " + comp.Key + ": " + comp.Value.Count + " complaints");
		}
		if (level >= 2) {
			bool first = true;
			msg = ">    lodged by: ";
			foreach (String who in comp.Value) {
				if (first) {
					msg = msg + who;
					first = false;
				} else {
					msg = msg + ", " + who;
				}
			}
			plugin.ConsoleWrite("^b[Complaint]^n " + msg);
		}
	}
	return false;
}

/* Command accepted */

if (!isComplaints && level >= 2) plugin.ConsoleWrite("^b[Complaint]^n " + player.FullName + " lodged a complaint with: " + player.LastChat);

/* Check if there was a matching weapon death */

if (!player.RoundData.issetString(kKillWeap)) {
	if (player.Data.getBool("ENG")) {
            ChatPlayer("Your last death wasn't from a suspect weapon");
    } else if (player.Data.getBool("FR")) {
            ChatPlayer("Your last death wasn't from a suspect weapon");
    } else if (player.Data.getBool("GE")) {
            ChatPlayer("Your last death wasn't from a suspect weapon");
    } else if (player.Data.getBool("SP")) {
            ChatPlayer("Your last death wasn't from a suspect weapon");
    } else if (player.Data.getBool("IT")) {
            ChatPlayer("Your last death wasn't from a suspect weapon");
    } else if (player.Data.getBool("PO")) {
            ChatPlayer("Your last death wasn't from a suspect weapon");
    } else if (player.Data.getBool("SW")) {
            ChatPlayer("Your last death wasn't from a suspect weapon");
    } else if (player.Data.getBool("RU")) {
            ChatPlayer("Your last death wasn't from a suspect weapon");
    } else if (player.Data.getBool("DA")) {
            ChatPlayer("Your last death wasn't from a suspect weapon");
    }
	return false;
}

String killWeap = player.RoundData.getString(kKillWeap);
String killName = player.RoundData.getString(kKillName);
DateTime killTime = (DateTime)player.RoundData.getObject(kKillTime);

if (level >= 2) {
	plugin.ConsoleWrite("^b[Complaint]^n " + player.FullName + " was killed by " + killName + " using " + killWeap + " at " + killTime.ToString("HH:mm:ss"));
}

/* Check if too much time has past */

TimeSpan since = DateTime.Now - killTime;

if (since.TotalSeconds > maxTimeToComplainSecs) {
	        if (player.Data.getBool("ENG")) {
            ChatPlayer("You waited too long to complain (" + since.TotalSeconds + " secs)");
        } else if (player.Data.getBool("FR")) {
            ChatPlayer("You waited too long to complain (" + since.TotalSeconds + " secs)");
        } else if (player.Data.getBool("GE")) {
            ChatPlayer("You waited too long to complain (" + since.TotalSeconds + " secs)");
        } else if (player.Data.getBool("SP")) {
            ChatPlayer("You waited too long to complain (" + since.TotalSeconds + " secs)");
        } else if (player.Data.getBool("IT")) {
            ChatPlayer("You waited too long to complain (" + since.TotalSeconds + " secs)");
        } else if (player.Data.getBool("PO")) {
            ChatPlayer("You waited too long to complain (" + since.TotalSeconds + " secs)");
        } else if (player.Data.getBool("SW")) {
            ChatPlayer("You waited too long to complain (" + since.TotalSeconds + " secs)");
        } else if (player.Data.getBool("RU")) {
            ChatPlayer("You waited too long to complain (" + since.TotalSeconds + " secs)");
        } else if (player.Data.getBool("DA")) {
            ChatPlayer("You waited too long to complain (" + since.TotalSeconds + " secs)");
        }
	player.RoundData.unsetString(kKillWeap);
	player.RoundData.unsetString(kKillName);
	player.RoundData.unsetObject(kKillTime);
	return false;	
}

/* Check if this player has already complained about the killer this round */

String kComplaints = kComplaintsM26;

if (isM320) {
	kComplaints = kComplaintsM320;
	suspectWeap = "underslung M320/GP-30";
} else {
	kComplaints = kComplaintsM26;
	suspectWeap = "M26 exploit";
}

if (!plugin.RoundData.issetObject(kComplaints)) {
	complaints = new Dictionary<String,List<String>>();
	plugin.RoundData.setObject(kComplaints, complaints);
} else {
	complaints = (Dictionary<String,List<String>>)plugin.RoundData.getObject(kComplaints);
}

if (complaints.ContainsKey(killName) && complaints[killName].Contains(player.Name)) {
	        if (player.Data.getBool("ENG")) {
            ChatPlayer("You already complained about " + killName + " using " + suspectWeap + " this round");
        } else if (player.Data.getBool("FR")) {
            ChatPlayer("You already complained about " + killName + " using " + suspectWeap + " this round");
        } else if (player.Data.getBool("GE")) {
            ChatPlayer("You already complained about " + killName + " using " + suspectWeap + " this round");
        } else if (player.Data.getBool("SP")) {
            ChatPlayer("You already complained about " + killName + " using " + suspectWeap + " this round");
        } else if (player.Data.getBool("IT")) {
            ChatPlayer("You already complained about " + killName + " using " + suspectWeap + " this round");
        } else if (player.Data.getBool("PO")) {
            ChatPlayer("You already complained about " + killName + " using " + suspectWeap + " this round");
        } else if (player.Data.getBool("SW")) {
            ChatPlayer("You already complained about " + killName + " using " + suspectWeap + " this round");
        } else if (player.Data.getBool("RU")) {
            ChatPlayer("You already complained about " + killName + " using " + suspectWeap + " this round");
        } else if (player.Data.getBool("DA")) {
            ChatPlayer("You already complained about " + killName + " using " + suspectWeap + " this round");
        }
	return false;
}

/* Lodge the new complaint */

if (!complaints.ContainsKey(killName)) {
	complaints[killName] = new List<String>();
}
complaints[killName].Add(player.Name);
int count = complaints[killName].Count;

        if (player.Data.getBool("ENG")) {
            ChatPlayer(count + " complaint(s) about " + killName + " using " + suspectWeap);
        } else if (player.Data.getBool("FR")) {
            ChatPlayer(count + " complaint(s) about " + killName + " using " + suspectWeap);
        } else if (player.Data.getBool("GE")) {
            ChatPlayer(count + " complaint(s) about " + killName + " using " + suspectWeap);
        } else if (player.Data.getBool("SP")) {
            ChatPlayer(count + " complaint(s) about " + killName + " using " + suspectWeap);
        } else if (player.Data.getBool("IT")) {
            ChatPlayer(count + " complaint(s) about " + killName + " using " + suspectWeap);
        } else if (player.Data.getBool("PO")) {
            ChatPlayer(count + " complaint(s) about " + killName + " using " + suspectWeap);
        } else if (player.Data.getBool("SW")) {
            ChatPlayer(count + " complaint(s) about " + killName + " using " + suspectWeap);
        } else if (player.Data.getBool("RU")) {
            ChatPlayer(count + " complaint(s) about " + killName + " using " + suspectWeap);
        } else if (player.Data.getBool("DA")) {
            ChatPlayer(count + " complaint(s) about " + killName + " using " + suspectWeap);
        }

if (level >= 2) plugin.ConsoleWrite("^b[Complaint]^n " + count + " of " + requiredComplaints + " on " + killName + " for " + suspectWeap);

/* Check if complaints are below the threshold */

if (count < requiredComplaints) {
	if (count > 1) {
        if (player.Data.getBool("ENG")) {
            msg = count + " accusations of " + suspectWeap + " against you!"; // CUSTOMIZE
            plugin.ServerCommand("admin.yell", msg, "10", "player", killName);
            msg = "Attention " + killName + "! " + msg;
            plugin.ServerCommand("admin.say", msg, "player", killName);
            if (level >= 2) plugin.ConsoleWrite("^b[Complaint]^n " + killName + " was warned for complaints about " + suspectWeap);
        } else if (player.Data.getBool("FR")) {
            msg = count + " accusations of " + suspectWeap + " against you!"; // CUSTOMIZE
            plugin.ServerCommand("admin.yell", msg, "10", "player", killName);
            msg = "Attention " + killName + "! " + msg;
            plugin.ServerCommand("admin.say", msg, "player", killName);
            if (level >= 2) plugin.ConsoleWrite("^b[Complaint]^n " + killName + " was warned for complaints about " + suspectWeap);
        } else if (player.Data.getBool("GE")) {
            msg = count + " accusations of " + suspectWeap + " against you!"; // CUSTOMIZE
            plugin.ServerCommand("admin.yell", msg, "10", "player", killName);
            msg = "Attention " + killName + "! " + msg;
            plugin.ServerCommand("admin.say", msg, "player", killName);
            if (level >= 2) plugin.ConsoleWrite("^b[Complaint]^n " + killName + " was warned for complaints about " + suspectWeap);
        } else if (player.Data.getBool("SP")) {
            msg = count + " accusations of " + suspectWeap + " against you!"; // CUSTOMIZE
            plugin.ServerCommand("admin.yell", msg, "10", "player", killName);
            msg = "Attention " + killName + "! " + msg;
            plugin.ServerCommand("admin.say", msg, "player", killName);
            if (level >= 2) plugin.ConsoleWrite("^b[Complaint]^n " + killName + " was warned for complaints about " + suspectWeap);
        } else if (player.Data.getBool("IT")) {
            msg = count + " accusations of " + suspectWeap + " against you!"; // CUSTOMIZE
            plugin.ServerCommand("admin.yell", msg, "10", "player", killName);
            msg = "Attention " + killName + "! " + msg;
            plugin.ServerCommand("admin.say", msg, "player", killName);
            if (level >= 2) plugin.ConsoleWrite("^b[Complaint]^n " + killName + " was warned for complaints about " + suspectWeap);
        } else if (player.Data.getBool("PO")) {
            msg = count + " accusations of " + suspectWeap + " against you!"; // CUSTOMIZE
            plugin.ServerCommand("admin.yell", msg, "10", "player", killName);
            msg = "Attention " + killName + "! " + msg;
            plugin.ServerCommand("admin.say", msg, "player", killName);
            if (level >= 2) plugin.ConsoleWrite("^b[Complaint]^n " + killName + " was warned for complaints about " + suspectWeap);
        } else if (player.Data.getBool("SW")) {
            msg = count + " accusations of " + suspectWeap + " against you!"; // CUSTOMIZE
            plugin.ServerCommand("admin.yell", msg, "10", "player", killName);
            msg = "Attention " + killName + "! " + msg;
            plugin.ServerCommand("admin.say", msg, "player", killName);
            if (level >= 2) plugin.ConsoleWrite("^b[Complaint]^n " + killName + " was warned for complaints about " + suspectWeap);
        } else if (player.Data.getBool("RU")) {
            msg = count + " accusations of " + suspectWeap + " against you!"; // CUSTOMIZE
            plugin.ServerCommand("admin.yell", msg, "10", "player", killName);
            msg = "Attention " + killName + "! " + msg;
            plugin.ServerCommand("admin.say", msg, "player", killName);
            if (level >= 2) plugin.ConsoleWrite("^b[Complaint]^n " + killName + " was warned for complaints about " + suspectWeap);
        } else if (player.Data.getBool("DA")) {
            msg = count + " accusations of " + suspectWeap + " against you!"; // CUSTOMIZE
            plugin.ServerCommand("admin.yell", msg, "10", "player", killName);
            msg = "Attention " + killName + "! " + msg;
            plugin.ServerCommand("admin.say", msg, "player", killName);
            if (level >= 2) plugin.ConsoleWrite("^b[Complaint]^n " + killName + " was warned for complaints about " + suspectWeap);
        }
	}
	return false;
}
/* Punish the suspect */
/* CUSTOMIZE: */
foreach (PlayerInfoInterface p in all) {
    if (p.Data.getBool("ENG")) {
        plugin.ServerCommand("admin.say", "Kicking " + killName + " for: " + msg, "player", p.Name);
    } else if (p.Data.getBool("FR")) {
        plugin.ServerCommand("admin.say", "Kicking " + killName + " for: " + msg, "player", p.Name);
    } else if (p.Data.getBool("GE")) {
        plugin.ServerCommand("admin.say", "Kicking " + killName + " for: " + msg, "player", p.Name);
    } else if (p.Data.getBool("SP")) {
        plugin.ServerCommand("admin.say", "Kicking " + killName + " for: " + msg, "player", p.Name);
    }else if (p.Data.getBool("IT")) {
        plugin.ServerCommand("admin.say", "Kicking " + killName + " for: " + msg, "player", p.Name);
    }else if (p.Data.getBool("PO")) {
        plugin.ServerCommand("admin.say", "Kicking " + killName + " for: " + msg, "player", p.Name);
    }else if (p.Data.getBool("SW")) {
        plugin.ServerCommand("admin.say", "Kicking " + killName + " for: " + msg, "player", p.Name);
    }else if (p.Data.getBool("RU")) {
        plugin.ServerCommand("admin.say", "Kicking " + killName + " for: " + msg, "player", p.Name);
    }else if (p.Data.getBool("DA")) {
        plugin.ServerCommand("admin.say", "Kicking " + killName + " for: " + msg, "player", p.Name);
    }
}
if (killName.Data.getBool("ENG")) {
    msg = suspectWeap + " not allowed on this server!"; // CUSTOMIZE
    plugin.KickPlayerWithMessage(killName, msg);
} else if (killName.Data.getBool("FR")) {
    msg = suspectWeap + " not allowed on this server!"; // CUSTOMIZE
    plugin.KickPlayerWithMessage(killName, msg);
} else if (killName.Data.getBool("GE")) {
    msg = suspectWeap + " not allowed on this server!"; // CUSTOMIZE
    plugin.KickPlayerWithMessage(killName, msg);
} else if (killName.Data.getBool("SP")) {
    msg = suspectWeap + " not allowed on this server!"; // CUSTOMIZE
    plugin.KickPlayerWithMessage(killName, msg);
} else if (killName.Data.getBool("IT")) {
    msg = suspectWeap + " not allowed on this server!"; // CUSTOMIZE
    plugin.KickPlayerWithMessage(killName, msg);
} else if (killName.Data.getBool("PO")) {
    msg = suspectWeap + " not allowed on this server!"; // CUSTOMIZE
    plugin.KickPlayerWithMessage(killName, msg);
} else if (killName.Data.getBool("SW")) {
    msg = suspectWeap + " not allowed on this server!"; // CUSTOMIZE
    plugin.KickPlayerWithMessage(killName, msg);
} else if (killName.Data.getBool("RU")) {
    msg = suspectWeap + " not allowed on this server!"; // CUSTOMIZE
    plugin.KickPlayerWithMessage(killName, msg);
} else if (killName.Data.getBool("DA")) {
    msg = suspectWeap + " not allowed on this server!"; // CUSTOMIZE
    plugin.KickPlayerWithMessage(killName, msg);
}
plugin.RoundData.setString(kPunished + killName, suspectWeap);
if (level >= 1) plugin.ConsoleWrite("^b[Complaint]^n ^8" + killName + " punished!^0");

return false;
Edit : my new metro code was working for a period and then insane limits just stopped working for some reason.

 

the code is here

 

http://www.codesend.com/view/450d2c8...cc8ba77bb0c8b/

 

it is not about size, it was saying something about parameters and insaneevaluater2.cs or whatever...

 

i had to wipe the whole procon layer and re-install.

 

 

Edit : please ignore the listed issues, they are mostly from errors in code. i will have to recheck them.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by superman50*:

 

Hello, my friend, is there no prohibition to the base fire plug, such as MERTO have been pressed into each other near the base, to the other side of the base shot after shot, plug-in, kill the shooter, the first KILL, second KICK, is there such a plugin? Rape base is very boring, a waste of time, lost antagonism

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by glenn82*:

 

hello

 

is there a limit to limit the amount of snipers on each team?

like 1 or 2 snipers per team but they may use the recon kit.

so only on the sniper rifles?

 

greets glenn

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

hello

 

is there a limit to limit the amount of snipers on each team?

like 1 or 2 snipers per team but they may use the recon kit.

so only on the sniper rifles?

 

greets glenn

Insane Limits V0.8/R2: Player/Weapon Permission Lottery (not SQDM)*

 

 

i was wondering how can we get the amount of warnings from the All-Activations-ln-5-Seconds-Count-As-One limit into other limits.

 

what i want to do is something like

 

!mywarnings

 

player.Name, you have X warnings

 

!clearwarnings (this is for admin and test purposes)

 

will reset warnings to 0 in the All-Activations-ln-5-Seconds-Count-As-One limit.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Looking for a way to limit hackusations on our server. Ideally I'd want players to report their hackusations to us directly instead of spamming the chat with 'so and so is hacking' all the time. Today on just one of our servers we had some form of hacker, hack, aimbot, cheater, etc mentioned over 100 times. While I really don't care about the occasional 'hacker' callout it does get frustrating when 1 or 2 users feel it necessary to call out everyone each time they are killed. This, of course, sets off the admin alterter plugin that many of our admins use.

 

Since their isn't a way to mute players (thanks, DICE), I'm thinking of a private warning psay / yell to the accuser. If they ignore the warnings and continue to spout on about hackers they are admin killed, then kicked (or temp banned) from the server.

 

If it's possible to retain the information between rounds that would be ideal.

 

BadPlayer yells 'hacker' then 'aimbot' on another line.

User has now used his 2 free hackusations for the next 1 hour. User is warned and told to contact an admin.

BadPlayer yells "hacker"

User is now punished with admin kill.

If BadPlayer says any of the keywords during the next 1 hour they are removed from the server (temp banned / kicked).

 

Thank you in advance if anyone is able to come up with a solution.

Good idea!

 

Here you go: Insane Limits V0.8/R1: Punish hackusations*

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Hello, my friend, is there no prohibition to the base fire plug, such as MERTO have been pressed into each other near the base, to the other side of the base shot after shot, plug-in, kill the shooter, the first KILL, second KICK, is there such a plugin? Rape base is very boring, a waste of time, lost antagonism

There is no code or limit to stop base rape or base camping. It's not possible.

 

The best that can be done is to have the losing team vote to punish the rapers and campers. You can use this limit code to do that:

 

Insane Limits V.0/R5: Vote to nuke camping/base raping team or !surrender (CQ-Rush)*

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Itz_cujo666*:

 

Hi,

 

Hoping someone can help, I got an Top Scoring Clan limit example from this thread*...

 

I have very limited skills and adapting it is beyond my ability.. :smile:

 

We just run SQDM, so I changed it a little, based on what I thought would work. The scoring seems to work fine, but the problem is it displays at the end of the round no problem, BUT it also displays the same score at the beginning of the next round. I'd like it to not display at the beginning of the round...

 

Here's my limit...it evaluates on spawn, with no action.

 

First check expression:

(team1.RemainTicketsPercent

 

Second check code:

double count = limit.Activations();

 

if (count > 1)

return false;

 

List players = new List();

players.AddRange(team1.players);

players.AddRange(team2.players);

players.AddRange(team3.players);

players.AddRange(team4.players);

Dictionary clan_stats = new Dictionary();

 

/* Collect clan statistics */

foreach(PlayerInfoInterface player_info in players)

{

if(player_info.Tag.Length == 0)

continue;

 

if (!clan_stats.ContainsKey(player_info.Tag))

clan_stats.Add(player_info.Tag, 0);

 

clan_stats[player_info.Tag] += player_info.ScoreRound;

}

 

/* Find the best scoring clan */

String best_clan = String.Empty;

double best_score = 0;

 

foreach(KeyValuePair pair in clan_stats)

if (pair.Value > best_score)

{

best_clan = pair.Key;

best_score = pair.Value;

}

 

if (best_clan.Length > 0)

{

String message = "TOP PLATOON this round is ["+ best_clan + "] with " + best_score + " points!";

plugin.SendGlobalMessage(message);

plugin.ConsoleWrite(message);

}

return false;

 

..any advice, help to stop it displaying at the start (but leave it displaying at end) of a round appreciated. thanks! I have another one...

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Insane Limits V0.8/R2: Player/Weapon Permission Lottery (not SQDM)*

 

 

i was wondering how can we get the amount of warnings from the All-Activations-ln-5-Seconds-Count-As-One limit into other limits.

 

what i want to do is something like

 

!mywarnings

 

player.Name, you have X warnings

 

!clearwarnings (this is for admin and test purposes)

 

will reset warnings to 0 in the All-Activations-ln-5-Seconds-Count-As-One limit.

That can be done. You need to add an OnAnyChat limit and use the same key string that has the warning count in it. Usually the key looks something like this:

 

Code:

String kCounter = killer.Name + "_TreatAsOne_Count";
You need to change killer.Name to player.Name in the OnAnyChat limit.

 

For example, OnAnyChat:

 

first_check Expression:

 

Code:

(Regex.Match(player.LastChat, @"^\s*!mywarnings", RegexOptions.IgnoreCase).Success)
second_check Code:

 

Code:

String kCounter =  player.Name + "_TreatAsOne_Count";

int warnings = 0;
if (server.RoundData.issetInt(kCounter)) warnings = server.RoundData.getInt(kCounter);

String msg = "You have been warned " + warnings + " times.";
plugin.ServerCommand("admin.say", msg, "player", player.Name); // private say
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Itz_cujo666*:

 

Hiya, we have another limit that seems to have "timing"trouble. We have implemeted a lot of examples from this forum, no worries, but this one and the above one seem to not work properly for us.

 

I got the example of Server First Blood here...*

 

My problem is, this one displays at the end of the round, not the beginning.

 

It evaluates on kill with the action set to say.

 

First check expression is set to: (true)

 

Second check expression is set to: limit.Activations() == 1

 

Say message (seems to work ok):

say_audience = All

say_message = %p_n% got first blood this round with a %w_n%!

 

Any support or assistance to get this and the above limit to work as intended would be much appreciated. :smile:

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Hi,

 

Hoping someone can help, I got an Top Scoring Clan limit example from this thread*...

 

I have very limited skills and adapting it is beyond my ability.. :smile:

 

We just run SQDM, so I changed it a little, based on what I thought would work. The scoring seems to work fine, but the problem is it displays at the end of the round no problem, BUT it also displays the same score at the beginning of the next round. I'd like it to not display at the beginning of the round...

 

Here's my limit...it evaluates on spawn, with no action.

 

First check expression:

(team1.RemainTicketsPercent

 

Second check code:

double count = limit.Activations();

 

if (count > 1)

return false;

 

List players = new List();

players.AddRange(team1.players);

players.AddRange(team2.players);

players.AddRange(team3.players);

players.AddRange(team4.players);

Dictionary clan_stats = new Dictionary();

 

/* Collect clan statistics */

foreach(PlayerInfoInterface player_info in players)

{

if(player_info.Tag.Length == 0)

continue;

 

if (!clan_stats.ContainsKey(player_info.Tag))

clan_stats.Add(player_info.Tag, 0);

 

clan_stats[player_info.Tag] += player_info.ScoreRound;

}

 

/* Find the best scoring clan */

String best_clan = String.Empty;

double best_score = 0;

 

foreach(KeyValuePair pair in clan_stats)

if (pair.Value > best_score)

{

best_clan = pair.Key;

best_score = pair.Value;

}

 

if (best_clan.Length > 0)

{

String message = "TOP PLATOON this round is ["+ best_clan + "] with " + best_score + " points!";

plugin.SendGlobalMessage(message);

plugin.ConsoleWrite(message);

}

return false;

 

..any advice, help to stop it displaying at the start (but leave it displaying at end) of a round appreciated. thanks! I have another one...

Welcome! When you put code in a post, put [ code ] at the beginning and [ /code ] at the end, WITHOUT SPACES, around the code. I had to put spaces in the previous sentence or else it would think the words "at the beginning and" were code. :smile:

 

The problem is that if one of the squads is empty at the start of the round, the tickets for that squad will be 0, which triggers the limit. Or, it may be that the ticket values aren't available until someone in that squad spawns. In any case, this is how you prevent that from happening.

 

Change first_check from Expression to Code.

 

Set first_check to this Code:

 

Code:

if (server.TimeRound < (3*60)) return false;
double t1 = 100;
double t2 = 100;
double t3 = 100;
double t4 = 100;
if (team1.players.Count > 0) t1 = team1.RemainTicketsPercent;
if (team2.players.Count > 0) t2 = team2.RemainTicketsPercent;
if (team3.players.Count > 0) t3 = team3.RemainTicketsPercent;
if (team4.players.Count > 0) t4 = team4.RemainTicketsPercent;

return(t1 < 10 || t2 < 10 || t3 < 10 || t4 < 10);
* Restored post. It could be that the author is no longer active.
Link to comment

Archived

This topic is now archived and is closed to further replies.




  • Our picks

    • Game Server Hosting:

      We're happy to announce that EZRCON will branch out into the game server provider scene. This is a big step for us so please having patience if something doesn't go right in this area. Now, what makes us different compared to other providers? Well, we're going with the idea of having a scaleable server hosting and providing more control in how you set up your server. For example, in Minecraft, you have the ability to control how many CPU cores you wish your server to have access to, how much RAM you want to use, how much disk space you want to use. This type of control can't be offered in a single service package so you're able to configure a custom package the way you want it.

      You can see all the available games here. Currently, we have the following games available.

      Valheim (From $1.50 USD)


      Rust (From $3.20 USD)


      Minecraft (Basic) (From $4.00 USD)


      Call of Duty 4X (From $7.00 USD)


      OpenTTD (From $4.00 USD)


      Squad (From $9.00 USD)


      Insurgency: Sandstorm (From $6.40 USD)


      Changes to US-East:

      Starting in January 2022, we will be moving to a different provider that has better support, better infrastructure, and better connectivity. We've noticed that the connection/routes to this location are not ideal and it's been hard getting support to correct this. Our contract for our two servers ends in March/April respectively. If you currently have servers in this location you will be migrated over to the new provider. We'll have more details when the time comes closer to January. The new location for this change will be based out of Atlanta, GA. If you have any questions/concerns please open a ticket and we'll do our best to answer them.
      • 5 replies
    • Hello All,

      I wanted to give an update to how EZRCON is doing. As of today we have 56 active customers using the services offered. I'm glad its doing so well and it hasn't been 1 year yet. To those that have services with EZRCON, I hope the service is doing well and if not please let us know so that we can improve it where possible. We've done quite a few changes behind the scenes to improve the performance hopefully. 

      We'll be launching a new location for hosting procon layers in either Los Angeles, USA or Chicago, IL. Still being decided on where the placement should be but these two locations are not set in stone yet. We would like to get feedback on where we should have a new location for hosting the Procon Layers, which you can do by replying to this topic. A poll will be created where people can vote on which location they would like to see.

      We're also looking for some suggestions on what else you would like to see for hosting provider options. So please let us know your thoughts on this matter.
      • 4 replies
    • Added ability to disable the new API check for player country info


      Updated GeoIP database file


      Removed usage sending stats


      Added EZRCON ad banner



      If you are upgrading then you may need to add these two lines to your existing installation in the file procon.cfg. To enable these options just change False to True.

      procon.private.options.UseGeoIpFileOnly False
      procon.private.options.BlockRssFeedNews False



       
      • 2 replies
    • I wanted I let you know that I am starting to build out the foundation for the hosting services that I talked about here. The pricing model I was originally going for wasn't going to be suitable for how I want to build it. So instead I decided to offer each service as it's own product instead of a package deal. In the future, hopefully, I will be able to do this and offer discounts to those that choose it.

      Here is how the pricing is laid out for each service as well as information about each. This is as of 7/12/2020.

      Single MySQL database (up to 30 GB) is $10 USD per month.



      If you go over the 30 GB usage for the database then each additional gigabyte is charged at $0.10 USD each billing cycle. If you're under 30GB you don't need to worry about this.


      Databases are replicated across 3 zones (regions) for redundancy. One (1) on the east coast of the USA, One (1) in Frankfurt, and One (1) in Singapore. Depending on the demand, this would grow to more regions.


      Databases will also be backed up daily and retained for 7 days.




      Procon Layer will be $2 USD per month.


      Each layer will only allow one (1) game server connection. The reason behind this is for performance.


      Each layer will also come with all available plugins installed by default. This is to help facilitate faster deployments and get you up and running quickly.


      Each layer will automatically restart if Procon crashes. 


      Each layer will also automatically restart daily at midnight to make sure it stays in tip-top shape.


      Custom plugins can be installed by submitting a support ticket.




      Battlefield Admin Control Panel (BFACP) will be $5 USD per month


      As I am still working on building version 3 of the software, I will be installing the last version I did. Once I complete version 3 it will automatically be upgraded for you.





      All these services will be managed by me so you don't have to worry about the technical side of things to get up and going.

      If you would like to see how much it would cost for the services, I made a calculator that you can use. It can be found here https://ezrcon.com/calculator.html

       
      • 11 replies
    • I have pushed out a new minor release which updates the geodata pull (flags in the playerlisting). This should be way more accurate now. As always, please let me know if any problems show up.

       
      • 9 replies
×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.