Jump to content

Insane Limits - Examples


Recommended Posts

Originally Posted by droopie*:

 

just a auto messages question, can someone write an example to use like the spambot but for each message to send it 3 times in a row?

 

15minutes

SEND THIS MESSAGE

SEND THIS MESSAGE

SEND THIS MESSAGE

15minutes

SEND THIS OTHER MESSAGE

SEND THIS OTHER MESSAGE

SEND THIS OTHER MESSAGE

etc...

 

for bf2 it had like that but every message line had a timer on it. to send 1 instantly it was like

 

300 message

0 line 2

0 line 3

300 other message

0 other line 2

0 other line 3

etc... the 0 was a 0 second value so wish it had that to make sure people would read the messages if displayed like that.

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

Originally Posted by QUACK-Major-Pain*:

 

Hi.

 

As some cheaters have reached their ranks spending playing only for a short time i'm thinking about if a limit setting time spend playing and rank into some relation might be a good idea for preventing them to enter the server?

 

Greets

Phil.

I think something like (players overall time / rank)

 

Using my own stats as an example where I have 161 hrs and rank 58.

Hackers can be found to be rank 36 in 24 hrs as an example.

 

The question would be, what is an acceptable number? 4, 4.5, 5, 5.5?

Looking through our clan members, our lowest is 1.62, so I guess I would be comfortable with about 1.5.

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

Originally Posted by PapaCharlie9*:

 

just a auto messages question, can someone write an example to use like the spambot but for each message to send it 3 times in a row?

This is going to be easy to do in version 0.0.0.8, so just hang on for that version.

 

It can be done in 0.7, but it's a lot of code to write, which would then become of no use when 0.8 comes out.

 

If someone really wants to do it, the basic recipe (algorithm) I would use requires 2 separate limits:

 

Limit A - OnSpawn

 

* first_check: Is the interval set in server.RoundData? Activate only if it is not set.

* second_check:

* Set an interval value in server.RoundData (900 seconds is 15 minutes)

* Set the current time in seconds in another RoundData value.

* The automatic clearing of RoundData insures that this gets reset at the beginning of every round and triggering OnSpawn only spams if there is a player in the game to spam at.

 

Limit B - OnInterval

 

* first_check: Is the interval set in server.RoundData?

* second_check:

* Calculate the amount of elapsed time and compare to the interval.

* If elapsed time is greater than the interval value:

** Execute action: in the requested case, do admin.say of the same message three times.

** Update the stored time with the current time

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

Originally Posted by PapaCharlie9*:

 

Think he means total hours played vs rank.

Since Rank is based on score, SPM is highly correlated. It's not exactly the same, since there may be some points not included in SPM, like awards/ribbons/medals, that do count to rank, but in general I think you can just use SPM.

 

That said, I do look at total time when considering the overall picture of a hacker. Anyone who's number #1 kills is a second level Assignment unlock, like L96, after less than 2 hours of play is probably hacking. I suppose it's possible to do with a cooperating friend and some booster servers, but that's damning in itself. It's definitely hacking if the weapon is the Jackhammer (requires 6 hours minimum).

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

Originally Posted by TMiland*:

 

This limit will wait until there are less than 20 tickets remaining in either team. It will announce three times the name of the top scoring clan.

 

Set limit to evaluate OnSpawn, set action to None

 

Set first_check to this Expression:

 

Code:

(team1.RemainTicketsPercent < 20 || team2.RemainTicketsPercent < 20)
Set second_check to this Code:

 

Code:

double count = limit.Activations();
    
    if (count > 3)
        return false;

    List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
    players.AddRange(team1.players);
    players.AddRange(team2.players);
    Dictionary<String, double> clan_stats = new Dictionary<String, double>();
    
    /* 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<String, double> 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 scoring clan this round is "+ best_clan + " with " + best_score + " points!";
                plugin.SendGlobalMessage(message); 
		plugin.ConsoleWrite(message);
        }   
    return false;
This limit should work for TDM, CQ, and Rush. It will not work properly for SQDM because it assumes there are only two teams.
Hi,

 

We don't use the tag function, we have it in the name...is it possible to get the clan tag from the playername?

If you can define specific letters to look for, for example we use NBF-PlayerName...

 

Any advice is welcome. :smile:

 

Regards.

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

Originally Posted by Phil_K*:

 

Hi.

 

Time spent leveling between ranks, is that what you mean? Is this info available in Battlelog?

It would be nice if that info would be accessible because i think you could get a feeling for it which rank steps had a helping hand. But more i had in mind ...

 

Think he means total hours played vs rank.

this. :smile:

For example take a look at this stats i came across in another forum:

http://battlelog.battlefield.com/bf3...ats/394892442/

 

Its rank 52 in less than 7 hours.

For me that is not done with legit play style. And i have seen a lot more stats were

ranks above 30 have been reached with a total time played that also doesn't fit to

people with much spare time and continuous play with normal methods.

 

Btw, thanks PhaxeNor for the example. :smile:

 

I think something like (players overall time / rank)

At first i had something in mind like that, a quotient representing rank per time or time per rank.

But having an experienced player starting from new will break this right from the start if it is not

combined with a limit on time and rank to start the checks on i guess.

 

Therefor I'm more with what PhaxeNor posted.

 

The reason i posted this though was to get a feeling how other see those fast-leveling-profiles

and to get a feeling for the limits suitable. :smile:

 

Thanks

Phil.

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

Originally Posted by ganjaparadise*:

 

Hey guys,

I search a solution to prevent my server to statpad with suicide, this morning a player suicide himself and got 30k point...

It's possible to count a number of suicide and kick him ?

 

Thank You.

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

Originally Posted by TMiland*:

 

Hey guys,

I search a solution to prevent my server to statpad with suicide, this morning a player suicide himself and got 30k point...

It's possible to count a number of suicide and kick him ?

 

Thank You.

Hi,

 

how is that even possible? You don't get points for suicide?

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

Originally Posted by ganjaparadise*:

 

I don't know cos i can't go to my server... I just can watch log and layer, but when a player 've 0 kills 40 deaths and only suicide appear on log with 30k point i suppose it's a statpadd... :ohmy:

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

Originally Posted by Phil_K*:

 

Hi.

 

I would guess he is playing on a conquest map, takes all flags for one side, kills himself switching to the other team and recaptures the flags. Some repeat this over and over and yes, it is statspadding. But you should find a battle report of that round in battlelog.

 

Greets

Phil.

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

Originally Posted by ghostfighter777*:

 

hi, anyone can help me please ? :s

 

report :

System.ArgumentOutOfRangeException: L'index était hors limites. Il ne doit pas être négatif et doit être inférieur à la taille de la collection.

Nom du paramètre*: index

 

Stack Trace:

à System.ThrowHelper.ThrowArgumentOutOfRangeExceptio n()

à System.Collections.Generic.List`1.get_Item(Int32 index)

à PRoConEvents.ServerInfo.get_MapFileName()

à PRoConEvents.InsaneLimits.LimitEvent..ctor(Limit limit, PlayerInfoInterface player, ServerInfoInterface server)

à PRoConEvents.InsaneLimits.Limit.RecordEvaluation(P layerInfoInterface player)

à PRoConEvents.InsaneLimits.evaluateLimitChecks(Limi t limit, PlayerInfoInterface player, PlayerInfoInterface killer, PlayerInfoInterface victim, KillInfoInterface kill)

à PRoConEvents.InsaneLimits.executeLimitAction(Limit limit, PlayerInfoInterface player, PlayerInfoInterface killer, PlayerInfoInterface victim, KillInfoInterface kill)

à PRoConEvents.InsaneLimits.evaluateLimit(Limit limit, PlayerInfo player)

à PRoConEvents.InsaneLimits.enforcer_thread_loop()

 

MSIL Stack Trace:

Void ThrowArgumentOutOfRangeException(), IL: 0x0

T get_Item(Int32), IL: 0x9

System.String get_MapFileName(), IL: 0x19

Void .ctor(Limit, PRoConEvents.PlayerInfoInterface, PRoConEvents.ServerInfoInterface), IL: 0x3C

Void RecordEvaluation(PRoConEvents.PlayerInfoInterface) , IL: 0x5C

Boolean evaluateLimitChecks(Limit, PRoConEvents.PlayerInfoInterface, PRoConEvents.PlayerInfoInterface, PRoConEvents.PlayerInfoInterface, PRoConEvents.KillInfoInterface), IL: 0x134

Boolean executeLimitAction(Limit, PRoConEvents.PlayerInfoInterface, PRoConEvents.PlayerInfoInterface, PRoConEvents.PlayerInfoInterface, PRoConEvents.KillInfoInterface), IL: 0x33

Boolean evaluateLimit(Limit, PRoConEvents.PlayerInfo), IL: 0x0

Void enforcer_thread_loop(), IL: 0x289

code :Code:
Dictionary<String, String> liste_map_rotation = new Dictionary<String, String>();

//liste des maps en rotation
liste_map_rotation.Add("MP_007", "MP_012");
liste_map_rotation.Add("MP_012", "MP_Subway");
liste_map_rotation.Add("MP_Subway", "MP_011");
liste_map_rotation.Add("MP_011", "MP_007");

if (liste_map_rotation.ContainsKey(server.MapFileName))
{
 plugin.ServerCommand("mapList.clear");
	if (server.PlayerCount < 10 )
	{
		plugin.ServerCommand("mapList.add "+liste_map_rotation[server.MapFileName]+" ConquestSmall0 2");
		plugin.SendGlobalMessage("The next map is " + liste_map_rotation[server.MapFileName]+" on Conquest large");
	}
	else
	{
		plugin.ServerCommand("mapList.add "+liste_map_rotation[server.MapFileName]+" ConquestLarge0 2");
		plugin.SendGlobalMessage("The next map is " + liste_map_rotation[server.MapFileName]+" on Conquest");
	}
plugin.ServerCommand("mapList.save");
}
else
{
	plugin.ServerCommand("mapList.clear");
	if (server.PlayerCount < 10 )
	{
		plugin.ServerCommand("mapList.add MP_007 ConquestSmall0 2 0");
	}
	else
	{
		plugin.ServerCommand("mapList.add MP_007 ConquestLarge0 2 0");
	}
plugin.ServerCommand("mapList.save");
}
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Phil_K*:

 

I find the round ! http://battlelog.battlefield.com/bf3...9/1/367617655/

It's possible to prevent that to kick him when he obtain 10-15 suicides or less ?

Looking at the report it doesn't look like the classic flag taking stats padding as mostly players do that alone or as a duo. Afaik his objective score would than be higher. In that match the score was mostly done with vehicles and by awards.

 

Hmm.. suicide has its own death strings and it should be possible to count them in relation to a given time or points achieved.

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

Originally Posted by PapaCharlie9*:

 

For example take a look at this stats i came across in another forum:

http://battlelog.battlefield.com/bf3...ats/394892442/

player.Spm > 1000 would catch that guy. Heck, player.Spm > 2000 would catch that guy. His SPM is 8840!

 

Where can i find the weapon codes for sniper rifles? I'm trying to make a sniper only server.

Look in your PRoCon installation folders and find a file called BF3.def (usually in procon/Configs). That is a text file that lists all the names for (almost) all of the weapons. Look for "SniperRifle". Each line contains the name of a sniper rifle. For example:

 

Code:

procon.protected.weapons.add Recon "M40A5" Primary SniperRifle
M40A5 is the name of a sniper rifle.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

This example uses two limits, one to announce admin's when they join, the other to provide an in-game command that allows players to ask for a list of admins with !adminlist. Requires 0.0.0.7 or later. Note: These examples compiled successfully, but I didn't try them to see if they worked.

 

Preparation

 

Set use_custom_lists to True and create a new list with these parameters:

 

Code:

name = admins
       data = name1, name2, name3, ...
Note: The names in the list must be spelled exactly as the soldier name of the player, without a tag. If the name is some crazy l337|

 

Admin Announcer Limit

 

Create a new limit to evaluate OnJoin and set action to Say

 

Set first_check to this Expression:

 

Code:

( plugin.isInList(player.Name, "admins") )
Leave second_check Disabled.

 

Set these action specific parameters:

 

Code:

say_message: Admin %p_fn% has just joined!
      say_audience: All
      say_delay: 60
There's a minimum of about a minute between the join and spawn, depending on how much load-out and squad changing the player does, so wait 60 seconds before issuing the say so that they can see the greeting too.

 

In-Game Admin List Command

 

Create a new limit to evaluate OnAnyChat and set action to None

 

Set first_check to this Expression:

 

Code:

( plugin.IsInGameCommand(player.LastChat) )
Set second_check to this Code:

 

Code:

/* Extract the command */
String command = plugin.ExtractInGameCommand(player.LastChat);

/* Sanity check the command */
if (null == command || command.Length == 0)
    return false;

/* Parse the command */
if (Regex.Match(command, "adminlist", RegexOptions.IgnoreCase).Success) {
    String adminList = "Admins: ";
    bool found = false;
    List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
    players.AddRange(team1.players);
    players.AddRange(team2.players);
    if (team3.players.Count > 0)
        players.AddRange(team3.players);
    if (team4.players.Count > 0)
        players.AddRange(team4.players);

    foreach (PlayerInfoInterface p in players) {
        if (plugin.isInList(p.Name, "admins")) {
            if (found)
               adminList = adminList + ", " + p.Name;
            else
               adminList = adminList + p.Name;
            found = true;
        }
    }
    if (found)
        plugin.SendSquadMessage(player.TeamId, player.SquadId, adminList);
}

return false;
For the example list of admins given above, the chat output will look like this:

 

Admins: name1, name2, name3

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

Originally Posted by HexaCanon*:

 

i do not know if this was mentioned before, but i found out that most hackers that come on my server start the killing at the first 2 minutes of the round and then they stop using the hack.

 

i just started using this limit against them

 

OnKill

 

first check : expression

Code:

( server.TimeRound < 60  && player.KillsRound > 10 )
second check : disabled

 

action : what ever you want (kick/ban/etc..)

 

 

 

this limit will be triggered when a player gets more than 10 kills in the first minute of the round.

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

Originally Posted by HopHead*:

 

Hi.

 

As some cheaters have reached their ranks spending playing only for a short time i'm thinking about if a limit setting time spend playing and rank into some relation might be a good idea for preventing them to enter the server?

 

Greets

Phil.

Why not just look at SCORE / MIN ?

 

Code:

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

Originally Posted by BobyTT*:

 

I got this error:

 

[23:16:06 93] [insane Limits] Compiling Limit #1 - K/Dr10 SPM900 - OnJoin

[23:16:07 17] [insane Limits] ERROR: 2 errors compiling Expression

[23:16:07 17] [insane Limits] ERROR: (CS0117, line: 20, column: 51): 'PRoConEvents.PlayerInfoInterface' does not contain a definition for 'kills'

[23:16:07 17] [insane Limits] ERROR: (CS0117, line: 20, column: 118): 'PRoConEvents.PlayerInfoInterface' does not contain a definition for 'kills'

 

Any idea why?

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

Originally Posted by Froz3nTundra*:

 

Rule #47 not working, double checked settings all seem correct, ideas? Some of these limits just not working as they should, is 0.0.0.7 buggy? A lot of the time, when procon starts up, none of the limits are compiled, they are enabled but show as not compiled...

 

Posted Image

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

Originally Posted by Rucki*:

 

micovery, the "Welcome Message Based on Country " limit looks great, any other countries to add? Sorry, wrong place, feel free to move this.

Code:

		        double count = limit.ActivationsTotal(player.Name);

        if (count > 1)
           return false;
		   
        String CC = player.CountryCode;
		
        if (CC.Equals("us"))
           plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("Welcome on Zockerstrich %p_n%!"));
        else if (CC.Equals("at"))
           plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("Servus %p_n% am Zockerstrich!"));
        else if(CC.Equals("fr"))
           plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("Bienvenue a Zockerstrich %p_n%!"));
        else if(CC.Equals("se"))
           plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("Vaelkommen till Zockerstrich %p_n%!"));
        else if(CC.Equals("fi"))
           plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("Tervetuloa Zockerstrich %p_n%!"));
        else if (CC.Equals("it"))
           plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("Benvenuto al Zockerstrich %p_n% !"));
        else if (CC.Equals("de"))
           plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("Willkommen am Zockerstrich %p_n%!"));
        else if (CC.Equals("be"))
           plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("Willkommen/Bienvenue/Welkom am Zockerstrich %p_n%!"));
        else if (CC.Equals("ch"))
           plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("Grueezi am Zockerstrich %p_n%!"));
        else if (CC.Equals("cz"))
           plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("Vítejte na Zockerstrich %p_n%!"));
        else if (CC.Equals("pl"))
           plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("Zapraszamy do Zockerstrich %p_n%!"));
        else if (CC.Equals("no"))
           plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("Velkommen til Zockerstrich %p_n%!"));
		           else if (CC.Equals("nl"))
           plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("Welkom bij de Zockerstrich%p_n%!"));
		   		           else if (CC.Equals("hu"))
           plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("Uedvoezoeljuek a Zockerstrich %p_n%!"));
        else
           plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("Welcome on Zockerstrich %p_n% from %p_cn%!"));


        return false;
In this example you can find an entrys with:

 

Code:

else if (CC.Equals("xx"))
           plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("your language %p_n% say hello!"));
Also you can paste this two lines for a new country.

Coutrycodes you can find here:

http://www.uspto.gov/patft/help/helpctry.htm

 

Rucki

 

If some of my messages are wrong translated; its a mistake from google-translator. :ohmy:

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

Originally Posted by PapaCharlie9*:

 

Anyone? :mad:myrcon.net/...insane-limits-examples#entry18650

 

is it possible to get the clan tag from the playername?

If you can define specific letters to look for, for example we use NBF-PlayerName...

It depends on the pattern. If it is always NBF, you don't need code to extract that, you always know it's NBF, right? All you really need is a way to detect if a player name starts with "NBF-". Here's how:

 

Code:

if (Regex.Match(player.Name, @"^NBF-").Success) {
    String tag = "NBF";
    // ... your code follows this comment
}
If you want to ignore the case of the tag, i.e., allow nbf as well as NBF, you make one small change:

 

Code:

if (Regex.Match(player.Name, @"^NBF-", [b]RegexOptions.IgnoreCase[/b]).Success) {
    String tag = "NBF";
    // ... your code follows this comment
}
If you want instead to extract any tag that follows the pattern:

 

XXX-PlayerName

 

Where XXX can be NBF, or nbf, or ABC or 123 or MM (only two letters) or FCKU (four letters), that is, the requirements are:

 

* First 2 to 4 characters in the name followed by one - (minus sign), no spaces separating

* Everything after the - (minus sign) is the player name

 

You can use something like this (not tested):

 

Code:

Match myMatch = Regex.Match(player.Name, @"^([^\s]{2,4})-([^\s]+)");
if (myMatch.Success) {
    String tag = myMatch.Groups[1].Value;
    String playerName = myMatch.Groups[2].Value;
}
Breaking down the regular expression (regex) step by step (this is not code, but rather a formatted explanation of what all the codes mean in the regular expression):

 

Code:

^ means, start matching from the beginning of player.Name
  ( means, start remembering everything that matches
    [ means, start a range of characters to match
      ^\s means, the range of characters that do NOT {^} include whitespace {\s}, such as spaces and tabs
    ] means, end of the range of characters to match
    {2,4} means, match at least 2 characters, but no more than 4
  ) means, stop remembering everything that matches, this is Groups[1]
- means, match one minus sign character literally
  ( means, start remembering everything that matches
    [ means, start a range of characters to match
      ^\s means, the range of characters that do NOT {^} include whitespace {\s}, such as spaces and tabs
    ] means, end of the range of characters to match
    + means, match one or more characters in the range
  ) means, stop remembering everything that matches, this is Groups[2]
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

It depends on the pattern. If it is always NBF, you don't need code to extract that, you always know it's NBF, right? All you really need is a way to detect if a player name starts with "NBF-". Here's how:

 

Code:

if (Regex.Match(player.Name, @"^NBF-").Success) {
    String tag = "NBF";
    // ... your code follows this comment
}
If you want to ignore the case of the tag, i.e., allow nbf as well as NBF, you make one small change:

 

Code:

if (Regex.Match(player.Name, @"^NBF-", [b]RegexOptions.IgnoreCase[/b]).Success) {
    String tag = "NBF";
    // ... your code follows this comment
}
If you want instead to extract any tag that follows the pattern:

 

XXX-PlayerName

 

Where XXX can be NBF, or nbf, or ABC or 123 or MM (only two letters) or FCKU (four letters), that is, the requirements are:

 

* First 2 to 4 characters in the name followed by one - (minus sign), no spaces separating

* Everything after the - (minus sign) is the player name

 

You can use something like this (not tested):

 

Code:

Match myMatch = Regex.Match(player.Name, @"^([^\s]{2,4})-([^\s]+)");
if (myMatch.Success) {
    String tag = myMatch.Groups[1].Value;
    String playerName = myMatch.Groups[2].Value;
}
Breaking down the regular expression (regex) step by step (this is not code, but rather a formatted explanation of what all the codes mean in the regular expression):

 

Code:

^ means, start matching from the beginning of player.Name
  ( means, start remembering everything that matches
    [ means, start a range of characters to match
      ^\s means, the range of characters that do NOT {^} include whitespace {\s}, such as spaces and tabs
    ] means, end of the range of characters to match
    {2,4} means, match at least 2 characters, but no more than 4
  ) means, stop remembering everything that matches, this is Groups[1]
- means, match one minus sign character literally
  ( means, start remembering everything that matches
    [ means, start a range of characters to match
      ^\s means, the range of characters that do NOT {^} include whitespace {\s}, such as spaces and tabs
    ] means, end of the range of characters to match
    + means, match one or more characters in the range
  ) means, stop remembering everything that matches, this is Groups[2]
Hi PapaCharlie9,

 

thank you for taking your time, how would you implement this in the "announce top scoring clan limit"?

 

Code:

double count = limit.Activations();
    
    if (count > 3)
        return false;

    List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
    players.AddRange(team1.players);
    players.AddRange(team2.players);
    Dictionary<String, double> clan_stats = new Dictionary<String, double>();
    
    /* 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<String, double> 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 scoring clan this round is "+ best_clan + " with " + best_score + " points!";
                plugin.SendGlobalMessage(message); 
		plugin.ConsoleWrite(message);
        }   
    return false;
I am no coder, i understand the logic, but I'll just break the code...:tongue:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Mootart*:

 

Regex.Match(kill.Weapon, @"m320|smaw|rpg|usas-12|roadkill|death", RegexOptions.IgnoreCase).Success && server.MapFileName.StartsWith("MP_Subway")

 

This code is for lock weapons activated only on map metro.

 

how about a msg. to all will only appear when its on metro to can you help me with that code please.

 

like: msg forbiden weapons. Bla bla bla

this msg will only appear on map metro...

 

is that possible? hope you could help me micovery.. will send soon this week.. :biggrin: for more beers.. :biggrin:

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




  • 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.