Jump to content

Insane Limits V0.8/R1: Vehicle Kill Rate Limit


ImportBot

Recommended Posts

Originally Posted by PapaCharlie9*:

 

Version V0.8/R1: Compiled but not tested.

 

In response to this request:

 

Not ideal but worth a try. Trying to understand this plug-in makes me dizzy. If you could write such a limit it would be much appreciated. My guess is, it would only need to target 3 maps in Rush: Kharg, Caspian and Firestorm.

 

1. 10 kill limit? Could be adjustable.

2. Yell warning targeting player before limit is reached.

3. Yell to player on limit violation why he was auto killed.

4. Just on RUSH maps that have jets.

 

If this is possible our community would love to try it.

 

Thanks

 

Wray

This limit will warn (yell) and then punish (kill) a player for having a vehicle kill rate that is too high. A kill rate is the number of kills per unit of time. The rate threshold, expressed as a max kill count over a number of seconds, is customizable. The warning and punishment messages are also customizable, just change the message in the code. Look for CUSTOMIZE in the code for places to change.

 

NOTE: This limits all vehicles, including Mortar. This could be a problem on maps with choppers, since the kill rates for those vehicles can be very high for normal/expected play. There's no way to tell the difference between a jet, chopper, DPV, tank, etc., so use with caution.

 


 

Create a limit to evaluate OnKill. Set Action to None.

 

Set first_check to this Expression:

 

Code:

(kill.Weapon == "Death")
Set second_check to this Code:

 

Code:

/* Version 0.8/R1 */
/* CUSTOMIZE: */
int maxKillsByVehicle = 10;
int timeSeconds = 20;

String kPrefix = "VWhore_"; // plugin.Data int
 
if ( limit.Activations(player.Name, TimeSpan.FromSeconds(timeSeconds)) >  maxKillsByVehicle  ) {
	// How many times have we warned this guy_
	int warnings = 1;
	String key = kPrefix + player.Name;
	String msg = "none";
	if (plugin.Data.issetInt(key)) warnings = plugin.Data.getInt(key);
	if (warnings == 1) {
		// First warning
		msg = "Your vehicle kill rate is too high, GTFO!"; // CUSTOMIZE
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
	} else {
		// It's punishing time!
		msg = "Prepare to die, vehicle whore!";  // CUSTOMIZE
		plugin.KillPlayer(player.Name, 20);
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
	}
	warnings = warnings + 1;
	plugin.Data.setInt(key, warnings);
}
return false;
To customize the
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

To restrict this limit to only work on Rush maps Kharg, Firestorm and Caspian, change first_check to this Expression:

 

Code:

(kill.Weapon == "Death" && Regex.Match(server.Gamemode, "Rush").Success && Regex.Match(server.MapFileName, @"(MP_007|MP_012|MP_018)", RegexOptions.IgnoreCase).Success)
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

10 kills in 20 seconds might not be right for jets, come to think of it. Something like 5 kills in 2 seconds might be better. It depends on how the kills are happening. Is it with strafing infantry? Or shooting down a transport chopper? Play with the numbers until you get something that works right.

 

If you want it to just be 10 kills total, regardless of the amount of time, change second_check to this:

 

Code:

/* Version 0.8/R1 */
/* CUSTOMIZE: */
int maxKillsByVehicle = 10;

String kPrefix = "VWhore_"; // plugin.Data int
 
if ( limit.Activations(player.Name) >  (maxKillsByVehicle/2)  ) {
	// How many times have we warned this guy_
	int warnings = 1;
	String key = kPrefix + player.Name;
	String msg = "none";
	if (plugin.Data.issetInt(key)) warnings = plugin.Data.getInt(key);
	if (warnings == 1) {
		// First warning
		msg = "Your vehicle kill rate is too high, GTFO!"; // CUSTOMIZE
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
	} else if ( limit.Activations(player.Name) > maxKillsByVehicle ) {
		// It's punishing time!
		msg = "Prepare to die, vehicle whore!";  // CUSTOMIZE
		plugin.KillPlayer(player.Name, 20);
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
	}
	warnings = warnings + 1;
	plugin.Data.setInt(key, warnings);
}
return false;
This warns at 50% of the max limit and punishes at 100%.
* Restored post. It could be that the author is no longer active.
Link to comment
  • 1 month later...

Originally Posted by rcappella*:

 

10 kills in 20 seconds might not be right for jets, come to think of it. Something like 5 kills in 2 seconds might be better. It depends on how the kills are happening. Is it with strafing infantry? Or shooting down a transport chopper? Play with the numbers until you get something that works right.

 

If you want it to just be 10 kills total, regardless of the amount of time, change second_check to this:

 

Code:

/* Version 0.8/R1 */
/* CUSTOMIZE: */
int maxKillsByVehicle = 10;

String kPrefix = "VWhore_"; // plugin.Data int
 
if ( limit.Activations(player.Name) >  (maxKillsByVehicle/2)  ) {
	// How many times have we warned this guy_
	int warnings = 1;
	String key = kPrefix + player.Name;
	String msg = "none";
	if (plugin.Data.issetInt(key)) warnings = plugin.Data.getInt(key);
	if (warnings == 1) {
		// First warning
		msg = "Your vehicle kill rate is too high, GTFO!"; // CUSTOMIZE
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
	} else if ( limit.Activations(player.Name) > maxKillsByVehicle ) {
		// It's punishing time!
		msg = "Prepare to die, vehicle whore!";  // CUSTOMIZE
		plugin.KillPlayer(player.Name, 20);
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
	}
	warnings = warnings + 1;
	plugin.Data.setInt(key, warnings);
}
return false;
This warns at 50% of the max limit and punishes at 100%.
Can you modify this to work with version 0.7?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Can you modify this to work with version 0.7?

Try this:

 

Code:

/* CUSTOMIZE: */
int maxKillsByVehicle = 10;

String kPrefix = "VWhore_"; // plugin.Data int
 
if ( limit.Activations(player.Name) >  (maxKillsByVehicle/2)  ) {
	// How many times have we warned this guy_
	int warnings = 1;
	String key = kPrefix + player.Name;
	String msg = "none";
	if (plugin.Data.issetInt(key)) warnings = plugin.Data.getInt(key);
	if (warnings == 1) {
		// First warning
		msg = "Your vehicle kill rate is too high, GTFO!"; // CUSTOMIZE
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		// plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
	} else if ( limit.Activations(player.Name) > maxKillsByVehicle ) {
		// It's punishing time!
		msg = "Prepare to die, vehicle whore!";  // CUSTOMIZE
		plugin.KillPlayer(player.Name, 20);
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		// plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
	}
	warnings = warnings + 1;
	plugin.Data.setInt(key, warnings);
}
return false;
* Restored post. It could be that the author is no longer active.
Link to comment
  • 3 weeks later...
  • 3 weeks later...

Originally Posted by wraygun*:

 

After much internal debate within the clan we finally started to use this limit, and it is awesome. Maybe its not for everyone, but it has balanced out the play in our server 10 fold. Thank you very much. I do need help on a couple of things though.

 

1. After you reach the 10 kill limit, It auto kills you when you try to get back into a vehicle. Anyway to have it reset so the kill limit will start over?

2. Any way to add a second warning before the limit is reached?

3. Can this limit be used with and exception list?

 

Thanks again for your hard work. I would recommend this limit to any admins that find there server constantly under attack by Ace pilots.

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

Originally Posted by PapaCharlie9*:

 

After much internal debate within the clan we finally started to use this limit, and it is awesome. Maybe its not for everyone, but it has balanced out the play in our server 10 fold. Thank you very much. I do need help on a couple of things though.

 

1. After you reach the 10 kill limit, It auto kills you when you try to get back into a vehicle. Anyway to have it reset so the kill limit will start over?

2. Any way to add a second warning before the limit is reached?

3. Can this limit be used with and exception list?

 

Thanks again for your hard work. I would recommend this limit to any admins that find there server constantly under attack by Ace pilots.

Regarding: "After you reach the 10 kill limit, It auto kills you when you try to get back into a vehicle. Anyway to have it reset so the kill limit will start over_"

 

In the same round? Not easily. Are you sure you want that? It turns the punishment into a slap on the wrist every 10th kill, if I'm understanding you correctly. Or is that the point, you just want to effectively force a bail-out and suicide so someone else gets a shot at the vehicle?

 

For #2 and #3, give this a try.

 

First you have define your exception list. I call it "ace_pilots" but you can change it to whatever -- just make sure you change the same text in the code.

 

Create a custom list called ace_pilots. Set it Enabled and set the comparison to CaseSensitive. Set its value to a comma separated list of player names or clan tags. Note, using a clan tag means that any player wearing that tag will have immunity.

 

For example:

 

list_X_data: micovery,Bl1ndy,LGN

 

That means that the player named micovery or [bYE]Bl1ndy (note that you omit the tag from the name for just a player name in the list) or any player with the [LGN] tag will have immunity.

 

This replaces your second_check Code:

 

Code:

/* Version 0.8/R2 */
/* CUSTOMIZE: */
int maxKillsByVehicle = 10;
String oklist = "ace_pilots";

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

if (plugin.isInList(player.Name, oklist ) || plugin.isInList(tag, oklist )) return false;

String kPrefix = "VWhore_"; // plugin.Data int
 
if ( limit.Activations(player.Name) >  (maxKillsByVehicle/2)  ) {
	// How many times have we warned this guy_
	int warnings = 1;
	String key = kPrefix + player.Name;
	String msg = "none";
	if (plugin.Data.issetInt(key)) warnings = plugin.Data.getInt(key);
	if (warnings > 0 && limit.Activations(player.Name) <= maxKillsByVehicle) {
		// Warnings
		msg = "Your vehicle kill rate is too high, GTFO!"; // CUSTOMIZE
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
	} else if ( limit.Activations(player.Name) > maxKillsByVehicle ) {
		// It's punishing time!
		msg = "Prepare to die, vehicle whore!";  // CUSTOMIZE
		plugin.KillPlayer(player.Name, 20);
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
	}
	warnings = warnings + 1;
	plugin.Data.setInt(key, warnings);
}
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by wraygun*:

 

In the same round? Not easily. Are you sure you want that?

The original intention was to just kill them(jet pilots) after a certain point but still allow them to use their vehicle of choice. If the rule was limited to just Jets that would be one thing, but since it limits all vehicles, we think it is unfair to deny you the use of any vehicle for the rest of the round. Also of note we are using the limit as 12 total kills, no time limit.

 

I know it sounds selfish to add exemptions to this limit but there was 2 or 3 players that were going to have heart attacks if they could not kill more than 12 people at a time.... so.... ya....

 

I am for sure dumb, but I'm not seeing a second warning or how to add one. What would be nice is....

 

On 6 kills Warn user that they are half way to the limit and will be auto killed. Customizable message.

 

On say 9 kills give another warning with custom message.

 

 

Thanks again!

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

Originally Posted by wraygun*:

 

I've been watching the rule all day and have noticed at least 3 times where it failed to kill the player. Here is an example:

 

http://battlelog.battlefield.com/bf3...8/1/309808689/ ----> player GeeXd 15-0

 

http://battlelog.battlefield.com/bf3/user/GeeXD/

 

[18:47:06] ADMIN (pyell to GeeXD) > Vehicle Whore Kill Limit Violated..... @rules

[18:47:18] ADMIN (pyell to GeeXD) > Vehicle Whore Kill Limit Violated..... @rules

[18:48:16] ADMIN (pyell to GeeXD) > Vehicle Whore Kill Limit Violated..... @rules

 

Any Idea why?

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

Originally Posted by PapaCharlie9*:

 

I've been watching the rule all day and have noticed at least 3 times where it failed to kill the player. Here is an example:

 

http://battlelog.battlefield.com/bf3...8/1/309808689/ ----> player GeeXd 15-0

 

http://battlelog.battlefield.com/bf3/user/GeeXD/

 

[18:47:06] ADMIN (pyell to GeeXD) > Vehicle Whore Kill Limit Violated..... @rules

[18:47:18] ADMIN (pyell to GeeXD) > Vehicle Whore Kill Limit Violated..... @rules

[18:48:16] ADMIN (pyell to GeeXD) > Vehicle Whore Kill Limit Violated..... @rules

 

Any Idea why?

What makes you think it failed to kill him? The first and second message are only 12 seconds apart and the delay before the kill is 20 seconds so they have time to see the yell, so that's expected. The third message is 70 seconds after the first, presumably 50 seconds after being killed at 18:47:26, which is enough time for someone to die, respawn on a squad mate in a vehicle and kill again.

 

To be sure, check your events.log (Events tab in PRoCon or the log file itself). There should be a killed by admin (or something like that) event in the log at 18:47:26. There should be a second one at 18:47:38 and a third one at 18:48:36.

 

In the new version (see below), I shortened up the time to 10 seconds to reduce the window for add-on kills.

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

Originally Posted by PapaCharlie9*:

 

The original intention was to just kill them(jet pilots) after a certain point but still allow them to use their vehicle of choice. If the rule was limited to just Jets that would be one thing, but since it limits all vehicles, we think it is unfair to deny you the use of any vehicle for the rest of the round. Also of note we are using the limit as 12 total kills, no time limit.

 

I know it sounds selfish to add exemptions to this limit but there was 2 or 3 players that were going to have heart attacks if they could not kill more than 12 people at a time.... so.... ya....

 

I am for sure dumb, but I'm not seeing a second warning or how to add one. What would be nice is....

 

On 6 kills Warn user that they are half way to the limit and will be auto killed. Customizable message.

 

On say 9 kills give another warning with custom message.

 

 

Thanks again!

Okay, given that you are trying to balance jet kills vs. other vehicle kills, a reset makes sense. Given a reset, why not reset if any non-vehicle kill happens before the max count is hit? A non-vehicle kill should cancel the count, right?

 

In order to reset after a kill/punishment, I had to pretty much completely rewrite the counting logic. See below.

 

For the follow-up warnings, I just use the same message. It happens on every kill after the first warning (after the halfway mark). The message has the count in it, e.g., "7 of 12 vehicle kills" and it's easier to code for just one message. If you really want a different message at a higher count, you can add one like this (after the msg = "You have ..." line):

 

Code:

if (vKills == 9) msg = "whatever you want the message at 9 kills to be";
This new version is complicated enough that it probably won't work on the first try, so I added some additional debugging messages. Try it out and post the section of the plugin.log and the events.log if things don't work as expected, or even if they do.

 

New version of first_check Expression (assuming you still want Rush only, and Kharg, Firestorm and Caspian only):

 

Code:

(Regex.Match(server.Gamemode, "Rush").Success && Regex.Match(server.MapFileName, @"(MP_007|MP_012|MP_018)", RegexOptions.IgnoreCase).Success)
New version of second_check Code:

Code:

/* Version 0.8/R3 */
/* CUSTOMIZE: */
int maxKillsByVehicle = 12;
String oklist = "ace_pilots";

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

if (plugin.isInList(player.Name, oklist ) || plugin.isInList(tag, oklist )) return false;

String kPrefix = "VWhore_";
String key = kPrefix + killer.Name; // plugin.RoundData int

if (kill.Weapon != "Death") { // Not a vehicle kill, reset the counter
        if (plugin.RoundData.issetInt(key)) {
            plugin.ConsoleWrite("^b[VWhore]^n " + killer.FullName + " non-vehicle kill with " + kill.Weapon + ", vKills counter reset!");
            plugin.RoundData.setInt(key, 0);
        }
        return false;
}

int vKills = 1;
if (plugin.RoundData.issetInt(key)) vKills = plugin.RoundData.getInt(key) + 1;
String msg = "none";

if ( vKills >  (maxKillsByVehicle/2)  ) {
        plugin.ConsoleWrite("^b[VWhore]^n " + killer.FullName + " has " + vKills + " vehicle kills!");
	if (vKills <= maxKillsByVehicle) {
		// Warnings
		msg = "You have " + vKills + " of " + maxKillsByVehicle + " vehicle kills! " + (maxKillsByVehicle-vKills) + " more and you will be killed by admin (plugin)! Type @rules"; // CUSTOMIZE
		plugin.ServerCommand("admin.yell", msg, "20", "player", killer.Name);
		plugin.ServerCommand("admin.say", msg, "player", killer.Name);
		plugin.PRoConChat("ADMIN (pyell to "+killer.FullName+") > " + msg);
		plugin.ConsoleWrite("^b[VWhore]^n " + killer.FullName + ": " + msg);
	} else {
		// It's punishing time!
		msg = "Vehicle Whore Kill Limit Violated..... @rules";  // CUSTOMIZE
                int killingDelay = 10;
		plugin.KillPlayer(killer.Name, killingDelay);
		plugin.ServerCommand("admin.yell", msg, killingDelay.ToString(), "player", killer.Name);
		plugin.SendGlobalMessage(killer.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+killer.FullName+") > " + msg);
		plugin.ConsoleWrite("^b[VWhore]^n " + killer.FullName + " will be killed in " + killingDelay + " seconds! Counter reset.");
		vKills = 0; // Reset
	}
}
plugin.RoundData.setInt(key, vKills);
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by wraygun*:

 

What makes you think it failed to kill him? The first and second message are only 12 seconds apart and the delay before the kill is 20 seconds so they have time to see the yell, so that's expected. The third message is 70 seconds after the first, presumably 50 seconds after being killed at 18:47:26, which is enough time for someone to die, respawn on a squad mate in a vehicle and kill again.

If you look at the Battle Report this particular player in question went 15 - 0. Even though they set off the limit they weren't charged with a death. Unless they don't get charged with a death? Another example which I have no logs for, comes from a round from which I was playing in. It was Rush Kharg and the player set off the limit as attackers in the heli on the first set of bases, he was still piloting the heli and scoring kills on the final set of Mcoms. Anyway, if I notice it again I will defiantly look for the procon or event logs.

 

Okay, given that you are trying to balance jet kills vs. other vehicle kills, a reset makes sense. Given a reset, why not reset if any non-vehicle kill happens before the max count is hit? A non-vehicle kill should cancel the count, right?

Awesome man!! we will give it a try and report back on our results. Thanks again!!
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

If you look at the Battle Report this particular player in question went 15 - 0. Even though they set off the limit they weren't charged with a death. Unless they don't get charged with a death?

The admin kill command does not count against death stats, no. So unless you see the admin kill event in your log, it didn't happen.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by wraygun*:

 

This new version is complicated enough that it probably won't work on the first try, so I added some additional debugging messages. Try it out and post the section of the plugin.log and the events.log if things don't work as expected, or even if they do.

The new version is working as intended. No issues so far. I will try and post the event and plugin logs when I get a chance.

 

Thanks

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

Originally Posted by wraygun*:

 

It looks like the AC-130 in RUSH mode is going to be another grossly overpowered weapon issue. I respectfully pre-request some limit to tame the AC-130 :ohmy:

 

Don't really know what or how yet, just thought i would put it on your radar.

 

Thanks

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

Originally Posted by PapaCharlie9*:

 

It looks like the AC-130 in RUSH mode is going to be another grossly overpowered weapon issue. I respectfully pre-request some limit to tame the AC-130 :ohmy:

 

Don't really know what or how yet, just thought i would put it on your radar.

 

Thanks

You're probably right. Barring a miracle, it's going to have the same problem as all other vehicle kills, no way to tell what they are because they all end up as "Death".
* Restored post. It could be that the author is no longer active.
Link to comment
  • 8 months later...

Originally Posted by KamelMitLocken*:

 

Hi all,

 

I was wondering if someone could give a quick look over my code and tell me if it is the right syntax.

What I want it to do is check the Kdr of a player upon kill by "Death" and warn him/her if it is over 8 and kill him/her after 1 waring. Its basically the same code, just a little altered (changes are bold). I am no programmer so I am not sure if it would work.

 

Thanks in advance!

 

Code:

(kill.Weapon == "Death")
Code:
* Version 0.8/R1 */
/* CUSTOMIZE: */

String kPrefix = "VWhore_"; // plugin.Data int
 
if ( limit.Activations(player.Name, [b]player.KdrRound) >  8[/b]  ) {
	// How many times have we warned this guy_
	int warnings = 1;
	String key = kPrefix + player.Name;
	String msg = "none";
	if (plugin.Data.issetInt(key)) warnings = plugin.Data.getInt(key);
	if (warnings == 1) {
		// First warning
		msg = "Your vehicle kill rate is too high, GTFO!"; // CUSTOMIZE
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
	} else {
		// It's punishing time!
		msg = "Prepare to die, vehicle whore!";  // CUSTOMIZE
		plugin.KillPlayer(player.Name, 20);
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
	}
	warnings = warnings + 1;
	plugin.Data.setInt(key, warnings);
}
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

No, this is what you want:

Code:

(kill.Weapon == "Death" && player.KdrRound > 8)
Code:
/* Version 0.8/R1 */
/* CUSTOMIZE: */

if ( limit.Activations(player.Name, TimeSpan.FromSeconds(2)) >  1) return false;

String kPrefix = "VWhore_"; // plugin.Data int
 
	// How many times have we warned this guy_
	int warnings = 1;
	String key = kPrefix + player.Name;
	String msg = "none";
	if (plugin.Data.issetInt(key)) warnings = plugin.Data.getInt(key);
	if (warnings <= 3) {
		// First warning
		msg = "Your vehicle kill rate is too high, GTFO!"; // CUSTOMIZE
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
	} else {
		// It's punishing time!
		msg = "Prepare to die, vehicle whore!";  // CUSTOMIZE
		plugin.KillPlayer(player.Name, 20);
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
	}
	warnings = warnings + 1;
	plugin.Data.setInt(key, warnings);

return false;
This gives 3 warnings before doing the kill.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by KamelMitLocken*:

 

May I ask for your help again PapaCharlie?

Iam getting a compilation error when trying to compile this expression: (kill.Weapon == "Death" && player.KdrRound > 8)

 

Errors are as follows:

21:40:29 89] [insane Limits] ERROR: 3 errors compiling Expression

[21:40:29 89] [insane Limits] ERROR: (CS1002, line: 38, column: 23): ; expected.

[21:40:29 89] [insane Limits] ERROR: (CS1525, line: 38, column: 31): invalid expression /.

[21:40:29 89] [insane Limits] ERROR: (CS1002, line: 38, column: 32): ; expected.

 

Any ideas?

 

Thanks in advance!

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

Originally Posted by PapaCharlie9*:

 

May I ask for your help again PapaCharlie?

Iam getting a compilation error when trying to compile this expression: (kill.Weapon == "Death" && player.KdrRound > 8)

 

Errors are as follows:

21:40:29 89] [insane Limits] ERROR: 3 errors compiling Expression

[21:40:29 89] [insane Limits] ERROR: (CS1002, line: 38, column: 23): ; expected.

[21:40:29 89] [insane Limits] ERROR: (CS1525, line: 38, column: 31): invalid expression /.

[21:40:29 89] [insane Limits] ERROR: (CS1002, line: 38, column: 32): ; expected.

 

Any ideas?

 

Thanks in advance!

Sorry, copy & paste error on my part. Try again with corrected version:

 

myrcon.net/...insane-limits-v08r1-vehicle-kill-rate-limit#entry24865

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

Originally Posted by KamelMitLocken*:

 

Thanks PC9.

Call me stupid but I an't see a differnce in the expression!?

Anyway, will try it and let you know.

 

Thanks for your efforts!!

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

Originally Posted by KamelMitLocken*:

 

I altered the code a little to nurture my needs.

What I want it to do is check if the kill is by "Death" and if the palyer has kdr higher than 12, so nothing new here.

Also the warnings stay in, but I added the counter reset upon a kill that is not "Death" and added a few if querys.

If the warning ist still under or equal 2 it gives a normal warning, otherwise it checks if the warnings are over or equal 5 where it would kick the player (not sure of position and syntax) or if the warnings are over 2 but under 5 in which case it would kill the player.

 

Could you just give the code a quick glance and let me know if the order is correct? It compiled without error but is currently disabled. Thanks!

 

EDIT: Something is off and I can't figure it out. I had 2 false positives with this limit. It seems as it sets itself off as soon as a player has 12 or more Kills with "Death", regardless of their own deaths. The two players in question had 12 Kills and 4 deaths and 13 Kills and 3 deaths respectively, at the time the limit activated. And I can't see why. Would be great if you could give it a quick glance!

 

Thanks a bunch!

 

Code:

/* Version 0.8/R1 */
/* CUSTOMIZE: */

if ( limit.Activations(player.Name, TimeSpan.FromSeconds(2)) >  1) return false;

String kPrefix = "VWhore_"; // plugin.Data int
String key = kPrefix + killer.Name; // plugin.RoundData int

if (kill.Weapon != "Death") { // Not a vehicle kill, reset the counter
        if (plugin.RoundData.issetInt(key)) {
            plugin.ConsoleWrite("^b[VWhore]^n " + killer.FullName + " non-vehicle kill with " + kill.Weapon + ", vKills counter reset!");
            plugin.RoundData.setInt(key, 0);
        }
        return false;
}
 
	// How many times have we warned this guy_
	int warnings = 1;
	String msg = "none";
	if (plugin.Data.issetInt(key)) warnings = plugin.Data.getInt(key);
	if (warnings <= 2) {
		// First warning
		msg = "Your vehicle kill rate is too high, go infantry!!"; // CUSTOMIZE
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
	} else {
        if (warnings >= 5) {
		msg = "Kicked for insane vehicle abuse!";  // CUSTOMIZE
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
		plugin.KickPlayerWithMessage(player.Name, msg);
		} else {
		// It's punishing time!
		msg = "Prepare to die, vehicle whore!";  // CUSTOMIZE
		plugin.KillPlayer(player.Name, 20);
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
	}}
	warnings = warnings + 1;
	plugin.Data.setInt(key, warnings);

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

Originally Posted by PapaCharlie9*:

 

Where is the KDR part? You should include the first_check also in your post.

 

I altered the code a little to nurture my needs.

What I want it to do is check if the kill is by "Death" and if the palyer has kdr higher than 12, so nothing new here.

Also the warnings stay in, but I added the counter reset upon a kill that is not "Death" and added a few if querys.

If the warning ist still under or equal 2 it gives a normal warning, otherwise it checks if the warnings are over or equal 5 where it would kick the player (not sure of position and syntax) or if the warnings are over 2 but under 5 in which case it would kill the player.

 

Could you just give the code a quick glance and let me know if the order is correct? It compiled without error but is currently disabled. Thanks!

 

EDIT: Something is off and I can't figure it out. I had 2 false positives with this limit. It seems as it sets itself off as soon as a player has 12 or more Kills with "Death", regardless of their own deaths. The two players in question had 12 Kills and 4 deaths and 13 Kills and 3 deaths respectively, at the time the limit activated. And I can't see why. Would be great if you could give it a quick glance!

 

Thanks a bunch!

 

Code:

/* Version 0.8/R1 */
/* CUSTOMIZE: */

if ( limit.Activations(player.Name, TimeSpan.FromSeconds(2)) >  1) return false;

String kPrefix = "VWhore_"; // plugin.Data int
String key = kPrefix + killer.Name; // plugin.RoundData int

if (kill.Weapon != "Death") { // Not a vehicle kill, reset the counter
        if (plugin.RoundData.issetInt(key)) {
            plugin.ConsoleWrite("^b[VWhore]^n " + killer.FullName + " non-vehicle kill with " + kill.Weapon + ", vKills counter reset!");
            plugin.RoundData.setInt(key, 0);
        }
        return false;
}
 
	// How many times have we warned this guy_
	int warnings = 1;
	String msg = "none";
	if (plugin.Data.issetInt(key)) warnings = plugin.Data.getInt(key);
	if (warnings <= 2) {
		// First warning
		msg = "Your vehicle kill rate is too high, go infantry!!"; // CUSTOMIZE
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
	} else {
        if (warnings >= 5) {
		msg = "Kicked for insane vehicle abuse!";  // CUSTOMIZE
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
		plugin.KickPlayerWithMessage(player.Name, msg);
		} else {
		// It's punishing time!
		msg = "Prepare to die, vehicle whore!";  // CUSTOMIZE
		plugin.KillPlayer(player.Name, 20);
		plugin.ServerCommand("admin.yell", msg, "20", "player", player.Name);
		plugin.SendGlobalMessage(player.FullName + ": " + msg);
		plugin.PRoConChat("ADMIN (pyell to "+player.FullName+") > " + msg);
	}}
	warnings = warnings + 1;
	plugin.Data.setInt(key, warnings);

return false;
* Restored post. It could be that the author is no longer active.
Link to comment
  • 3 weeks later...

Originally Posted by TMiland*:

 

Sure, replace plugin.KillPlayer(player.Name, 20); with plugin.KickPlayer(player.Name);

Thank you Chief! :-D

 

*Edit

Ops, got a compiling error:

[09:13:06 34] [insane Limits] Compiling Limit #3 - Vehicle kill limit - OnKill

[09:13:06 52] [insane Limits] ERROR: 1 error compiling Expression

[09:13:06 52] [insane Limits] ERROR: (CS0117, line: 59, column: 22): 'PRoConEvents.PluginInterface' does not contain a definition for 'KickPlayer'

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

Originally Posted by PapaCharlie9*:

 

Thank you Chief! :-D

 

*Edit

Ops, got a compiling error:

Sorry, its plugin.KickPlayer(player.Name, "GTFO, vehicle whore!");

 

It needs a kick message, so change "GTFO, vehicle whore!" to whatever you want.

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