Jump to content

Insane Limits Requests


ImportBot

Recommended Posts

Originally Posted by BuRockK*:

 

Because Yell messages looks shitty without \n (new line support) in proconrulz and proconrulz havent delay or TimeSpan

You can use pb queued command function

 

On Say;Text !whatever;Exec punkBuster.pb_sv_command pb_sv_task 3 exec admin.say "message" %p%

* Restored post. It could be that the author is no longer active.
Link to comment
  • Replies 3.2k
  • Created
  • Last Reply

Originally Posted by moacco07*:

 

Hello LCARSx64,

 

Thank you for the answer. I have a friend that told me that he's using two Procon for one server. So I was curious to know, that's all.

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

Originally Posted by Hodor*:

 

You can use pb queued command function

 

On Say;Text !whatever;Exec punkBuster.pb_sv_command pb_sv_task 3 exec admin.say "message" %p%

I know about it but I do not want to clutter up the PB. Too many texts :ohmy:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Mamba334*:

 

first check 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;

if (t1 < 8 || t2 < 8 || t3 < 8 || t4 < 8) return true;
else return false;
second check code

Code:

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

    List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
    players.AddRange(team1.players);
    players.AddRange(team2.players);
    players.AddRange(team3.players);
    players.AddRange(team4.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 playerTag = best_clan;

	List<PlayerInfoInterface> clan = new List<PlayerInfoInterface>();

	foreach (PlayerInfoInterface p in players) {
		String clanTag = p.Tag;
		if (String.IsNullOrEmpty(clanTag)) continue;
		if (clanTag != playerTag) continue;
		// Found a clan member!
		clan.Add(p);
	}
	
	String msg = "["+best_clan+"]";
	bool first = true;
	foreach(PlayerInfoInterface clan_member in clan) {
		if (first) {
			msg = msg + clan_member.Name;
			first = false;
		} else {
			msg = msg + " ,[" + best_clan +"]" + clan_member.Name;
		}
	}
		String message = "TOP PLATOON this round is ["+ best_clan + "] with " + best_score + " points!";
                plugin.SendGlobalMessage(message);
				foreach(PlayerInfoInterface clan_member in clan) {
				plugin.SendGlobalMessage("["+best_clan+"]"+clan_member.Name);
				}
		message = "TOP PLATOON this round is ["+ best_clan + "] -" + msg + " with " + best_score + " points!";
		plugin.ServerCommand("admin.yell", (message));
		plugin.ConsoleWrite(message);
        }
return false;
this is compiled , please test it to see if it is working as intended.

 

Edit : i am testing it now, found some mistakes i will replace the code in few minutes, when i do i will add a new edit message telling you about it.

 

Edit 2 : should work now hopefully.

Hello, Hexa. Quick question; what is the action for this? I have it set to OnSpawn and action Say and it is spamming the chat box badly. I have the code for End Of Round Stats, but I wanted Top Clan and Best 3 Players too. I'm still looking for the Best 3 Players.

 

Thanks

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

Originally Posted by Level*:

 

Hello I need a shotgun limit for our server.

 

With 2x Kill, 1x TBAN for 20min, free slot when the player leaves the server.

 

Can anyone help me please ?

 

...*, but I like this as a limit.

 

LG level

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

Originally Posted by Level*:

 

I also still need a timebased KD limit.

 

Has anyone an idea how to implement that?

 

First Check = Code

 

//Whitelist

if (plugin.isInList(player.Name, "Whitelist_Limit")) {

return false;

} else {

return true;

}

Second Check = Code

 

//Battlelog Kdr Kicker

if(player.Kdr > 1.5) {

plugin.KickPlayerWithMessage(player.Name, ("[Autoadmin] Sorry your Battlelog K/D is over 1.5"));

return true;

}

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

Originally Posted by BuRockK*:

 

I also still need a timebased KD limit.

 

Has anyone an idea how to implement that?

 

First Check = Code

 

 

 

Second Check = Code

 

 

 

THX Level

Im not sure what you mean by timebased KDR limit but the example you gave was almost right.

 

Heres a simple KDR limit:

 

limit_evaluation: OnJoin

first_check: Code

first_check_code:

Code:

// KD LIMIT  //
double MaxKD = 3.9; // put here the max player KDR

double TmpPlayerKD = player.Kdr;
String TmpPlayerTag = player.Tag;
if (TmpPlayerKD > MaxKD) {
    plugin.ConsoleWrite("^1^bKD LIMIT:^0^n [" + TmpPlayerTag + "] " + player.Name + " KICKED by KD limit. Current Battlelog KD: " + TmpPlayerKD.ToString());
    plugin.PRoConChat("^1^bKD LIMIT:^0^n [" + TmpPlayerTag + "] " + player.Name + " KICKED by KD limit. Current Battlelog KD: " + TmpPlayerKD.ToString());
    plugin.KickPlayerWithMessage(player.Name, plugin.R("Kicked by KD limit (max " + MaxKD.ToString() + " KD in Battlelog)"));
}
second_check: Disabled

limit_action: None

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

Originally Posted by Level*:

 

Im not sure what you mean by timebased KDR limit but the example you gave was almost right.

 

Heres a simple KDR limit:

 

limit_evaluation: OnJoin

first_check: Code

first_check_code:

Code:

// KD LIMIT  //
double MaxKD = 3.9; // put here the max player KDR

double TmpPlayerKD = player.Kdr;
String TmpPlayerTag = player.Tag;
if (TmpPlayerKD > MaxKD) {
    plugin.ConsoleWrite("^1^bKD LIMIT:^0^n [" + TmpPlayerTag + "] " + player.Name + " KICKED by KD limit. Current Battlelog KD: " + TmpPlayerKD.ToString());
    plugin.PRoConChat("^1^bKD LIMIT:^0^n [" + TmpPlayerTag + "] " + player.Name + " KICKED by KD limit. Current Battlelog KD: " + TmpPlayerKD.ToString());
    plugin.KickPlayerWithMessage(player.Name, plugin.R("Kicked by KD limit (max " + MaxKD.ToString() + " KD in Battlelog)"));
}
second_check: Disabled

limit_action: None

The KD limit should be 09:00 to 15:00, THX for the Code
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by maxdralle*:

 

The KD limit should be 09:00 to 15:00, THX for the Code

KD limit from 09:00 to 15:00 o clock:

 

Code:

// KD LIMIT  //
double MaxKD = 3.9; // put here the max player KDR

double TmpPlayerKD = player.Kdr;
String TmpPlayerTag = player.Tag;
if ((DateTime.Now.Hour >= 9) && (DateTime.Now.Hour < 15)) {
	if (TmpPlayerKD > MaxKD) {
		plugin.ConsoleWrite("^1^bKD LIMIT:^0^n [" + TmpPlayerTag + "] " + player.Name + " KICKED by KD limit. Current Battlelog KD: " + TmpPlayerKD.ToString());
		plugin.PRoConChat("^1^bKD LIMIT:^0^n [" + TmpPlayerTag + "] " + player.Name + " KICKED by KD limit. Current Battlelog KD: " + TmpPlayerKD.ToString());
		plugin.KickPlayerWithMessage(player.Name, plugin.R("Kicked by KD limit (max " + MaxKD.ToString() + " KD in Battlelog)"));
	}
}
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Mamba334*:

 

I'm using this and it works perfectly for us.

 

Set limit to evaluate OnSpawn, and action to Kick

Set first_check to this Expression:

Code:

( player.Kdr > 2.5 )

 

You may adjust the values of Kdr as you see fit.

 

Hope this helps? Good day!

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

Originally Posted by Level*:

 

KD limit from 09:00 to 15:00 o clock:

 

Code:

// KD LIMIT  //
double MaxKD = 3.9; // put here the max player KDR

double TmpPlayerKD = player.Kdr;
String TmpPlayerTag = player.Tag;
if ((DateTime.Now.Hour >= 9) && (DateTime.Now.Hour < 15)) {
	if (TmpPlayerKD > MaxKD) {
		plugin.ConsoleWrite("^1^bKD LIMIT:^0^n [" + TmpPlayerTag + "] " + player.Name + " KICKED by KD limit. Current Battlelog KD: " + TmpPlayerKD.ToString());
		plugin.PRoConChat("^1^bKD LIMIT:^0^n [" + TmpPlayerTag + "] " + player.Name + " KICKED by KD limit. Current Battlelog KD: " + TmpPlayerKD.ToString());
		plugin.KickPlayerWithMessage(player.Name, plugin.R("Kicked by KD limit (max " + MaxKD.ToString() + " KD in Battlelog)"));
	}
}
@maxdralle thx for your code ^^it works well

 

but I want to make now the limit a little different and indeed as Grovax HERE* solved, for all weapons and with the Round KDR

 

 

SETUP LIMIT#1

limit_evaluation: OnKill

limit_first_check: Expression

limit_first_check_code: paste the CODE#1 here

 

CODE#1

Code:

(Regex.Match(kill.Weapon, @"(_:[b]for all weapons, Tanks,  Heli, Bird and etc[/b])", RegexOptions.IgnoreCase).Success)
ENABLE SECOND CHECK

limit_second_check: Code

limit_second_check_code: paste the CODE#2 here

CODE#2

 

Code:

// set max intern KDR
int maxKDR = 8;

// set min kills
int minKills = 100;

// set max kills befor warn player
int warnPlayer = 20;

// set max kills to kick/ban
int kickPlayer = 30;

String kCounter = killer.Name + "_Heli_Count";
String kCounterWarn = killer.Name + "_Heli_Count_Warn";
int warnings = 0;
int showWarnings = 0;

if (limit.Activations(killer.Name, TimeSpan.FromSeconds(2)) > 1) return false;
if (server.RoundData.issetInt(kCounter)) warnings = server.RoundData.getInt(kCounter);
if (server.RoundData.issetInt(kCounterWarn)) showWarnings = server.RoundData.getInt(kCounterWarn);

warnings += 1;
server.RoundData.setInt(kCounter, warnings);

if((player.KillsRound >= minKills) && (player.KdrRound >= maxKDR)) {
	if ((warnings >= warnPlayer) && (warnings < kickPlayer)) {
		showWarnings += 1;
		String globalMessage = "Dont farm with Heli! Warning (" + showWarnings + "/" + (kickPlayer-warnPlayer) + ")";
		plugin.SendPlayerMessage(killer.Name, globalMessage);
		plugin.SendPlayerYell(killer.Name, globalMessage, 10);
	} else if ((warnings >= kickPlayer)) {
		plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 20, "Banned (20m) for helicoper farming!");
		
		//plugin.SendGlobalMessage(globalMessage);
		//plugin.PRoConChat("HeliFarmStop > Say > " + globalMessage);
		//plugin.KickPlayerWithMessage(killer.Name, "Kicked for helicoper farming!");
	}
}
return false;
KD limit from 09:00 to 15:00 o clock:

 

Code:

if ((DateTime.Now.Hour >= 9) && (DateTime.Now.Hour < 15))
I hope one can help me

 

THX Level

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

Originally Posted by Level*:

 

@level

 

use this code for the first check (limit_first_check: Expression):

Code:

((DateTime.Now.Hour >= 9) && (DateTime.Now.Hour < 15))
OK thx, but i need the Code for all Weapons, or is not required ?

 

Code:

(Regex.Match(kill.Weapon, @"(_:[b][u]for all weapons, Tanks,  Heli, Bird and etc[/u][/b])", RegexOptions.IgnoreCase).Success)
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BuRockK*:

 

OK thx, but i need the Code for all Weapons, or is not required ?

 

Code:

(Regex.Match(kill.Weapon, @"(_:[b][u]for all weapons, Tanks,  Heli, Bird and etc[/u][/b])", RegexOptions.IgnoreCase).Success)
You can find all the weapon codes here:

 

showthread....s-BF3-BF4-BFHL*

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

Originally Posted by Level*:

 

Hello would this work for all weapons?

 

Code:

(Regex.Match(kill.Weapon, @"(_:Nonlethal|DMR|AssaultRifle|SniperRifle|SMG|ProjectileExplosive|Shorty|Melee|Explosive|Impact|LMG|Carbine|PDW|Handgun|VehiclePersonal|VehicleTransport|VehicleLight|VehicleHeavy|VehicleAir|VehicleWater|VehicleStationary|Heli|Bird|AH-1Z)", RegexOptions.IgnoreCase).Success)
THX for your help

 

Level

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

Originally Posted by ColColonCleaner*:

 

Hello would this work for all weapons?

 

Code:

(Regex.Match(kill.Weapon, @"(_:Nonlethal|DMR|AssaultRifle|SniperRifle|SMG|ProjectileExplosive|Shorty|Melee|Explosive|Impact|LMG|Carbine|PDW|Handgun|VehiclePersonal|VehicleTransport|VehicleLight|VehicleHeavy|VehicleAir|VehicleWater|VehicleStationary|Heli|Bird|AH-1Z)", RegexOptions.IgnoreCase).Success)
THX for your help

 

Level

Do not create a no-kill server. You will get it reported and shut down.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by maxdralle*:

 

@level

here is your ingame KDR / farming limit from 9 till 15 o clock.

 

 

SETUP LIMIT#1

limit_evaluation: OnKill

limit_first_check: Expression

limit_first_check_code: paste the CODE#1 here

 

CODE#1

Code:

((DateTime.Now.Hour >= 9) && (DateTime.Now.Hour < 15))
ENABLE SECOND CHECK

limit_second_check: Code

limit_second_check_code: paste the CODE#2 here

 

Code#2

Code:

// set max intern KDR
int maxKDR = 8;

// set min kills
int minKills = 100;

// set max kills befor warn player
int warnPlayer = 20;

// set max kills to kick/ban
int kickPlayer = 30;

String kCounter = killer.Name + "_killx_Count";
String kCounterWarn = killer.Name + "_killx_Count_Warn";
int warnings = 0;
int showWarnings = 0;

if (limit.Activations(killer.Name, TimeSpan.FromSeconds(2)) > 1) return false;
if (server.RoundData.issetInt(kCounter)) warnings = server.RoundData.getInt(kCounter);
if (server.RoundData.issetInt(kCounterWarn)) showWarnings = server.RoundData.getInt(kCounterWarn);

warnings += 1;
server.RoundData.setInt(kCounter, warnings);

if((player.KillsRound >= minKills) && (player.KdrRound >= maxKDR)) {
	if ((warnings >= warnPlayer) && (warnings < kickPlayer)) {
		showWarnings += 1;
		String globalMessage = killer.Name + " your current round KD is too high (warning " + showWarnings + "/" + (kickPlayer-warnPlayer) + ")";
		plugin.SendPlayerMessage(killer.Name, "KILL-FARM-LIMIT: " + globalMessage);
		plugin.SendPlayerYell(killer.Name, globalMessage, 10);
	} else if ((warnings >= kickPlayer)) {
		plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 20, "Banned (20m) for kill farming!");
		
		//plugin.SendGlobalMessage(globalMessage);
		//plugin.PRoConChat("HeliFarmStop > Say > " + globalMessage);
		//plugin.KickPlayerWithMessage(killer.Name, "Kicked for kill farming!");
	}
}
return false;
* Restored post. It could be that the author is no longer active.
Link to comment
  • 3 weeks later...

Originally Posted by B-73*:

 

Hi,

 

To set 9am in the morning and 1am midnight must i set like this?

 

((DateTime.Now.Hour >= 9) && (DateTime.Now.Hour

 

 

This code is perfect and looking for a long time.

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

Originally Posted by B-73*:

 

@level

here is your ingame KDR / farming limit from 9 till 15 o clock.

 

 

SETUP LIMIT#1

limit_evaluation: OnKill

limit_first_check: Expression

limit_first_check_code: paste the CODE#1 here

 

CODE#1

Code:

((DateTime.Now.Hour >= 9) && (DateTime.Now.Hour < 15))
ENABLE SECOND CHECK

limit_second_check: Code

limit_second_check_code: paste the CODE#2 here

 

Code#2

Code:

// set max intern KDR
int maxKDR = 8;

// set min kills
int minKills = 100;

// set max kills befor warn player
int warnPlayer = 20;

// set max kills to kick/ban
int kickPlayer = 30;

String kCounter = killer.Name + "_killx_Count";
String kCounterWarn = killer.Name + "_killx_Count_Warn";
int warnings = 0;
int showWarnings = 0;

if (limit.Activations(killer.Name, TimeSpan.FromSeconds(2)) > 1) return false;
if (server.RoundData.issetInt(kCounter)) warnings = server.RoundData.getInt(kCounter);
if (server.RoundData.issetInt(kCounterWarn)) showWarnings = server.RoundData.getInt(kCounterWarn);

warnings += 1;
server.RoundData.setInt(kCounter, warnings);

if((player.KillsRound >= minKills) && (player.KdrRound >= maxKDR)) {
	if ((warnings >= warnPlayer) && (warnings < kickPlayer)) {
		showWarnings += 1;
		String globalMessage = killer.Name + " your current round KD is too high (warning " + showWarnings + "/" + (kickPlayer-warnPlayer) + ")";
		plugin.SendPlayerMessage(killer.Name, "KILL-FARM-LIMIT: " + globalMessage);
		plugin.SendPlayerYell(killer.Name, globalMessage, 10);
	} else if ((warnings >= kickPlayer)) {
		plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 20, "Banned (20m) for kill farming!");
		
		//plugin.SendGlobalMessage(globalMessage);
		//plugin.PRoConChat("HeliFarmStop > Say > " + globalMessage);
		//plugin.KickPlayerWithMessage(killer.Name, "Kicked for kill farming!");
	}
}
return false;
Hi Maxdralle,

 

First i want to thank you for this script. I have a question for you and can you take a look into this script.

I have many pilots on our server daily with high kd and higher then 80 kills. We use kill limit 80 and kd 8 but the script doesnt realy work.

 

Can you take a look?

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

Originally Posted by BuRockK*:

 

Hi Maxdralle,

 

First i want to thank you for this script. I have a question for you and can you take a look into this script.

I have many pilots on our server daily with high kd and higher then 80 kills. We use kill limit 80 and kd 8 but the script doesnt realy work.

 

Can you take a look?

The limit triggers when a player has 80+ kill and over roundKdr: 8

 

So maybe thats why its not working?

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

Originally Posted by maxdralle*:

 

Hi Maxdralle,

 

First i want to thank you for this script. I have a question for you and can you take a look into this script.

I have many pilots on our server daily with high kd and higher then 80 kills. We use kill limit 80 and kd 8 but the script doesnt realy work.

 

Can you take a look?

your code #1:

the limit will be enable from 9 till 15 o clock. the rest of the time is it disabled.

if you want to enable the limit around the time, then repace the code#1 with this:

Code:

true
your code #2:

the minKills is set on 100 to enable the limit/warnings. you can change this values. try this:

 

Code:

// set min kills
int minKills = 30;

// set max kills befor warn player
int warnPlayer = 10;

// set max kills to kick/ban
int kickPlayer = 15;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by B-73*:

 

The limit triggers when a player has 80+ kill and over roundKdr: 8

 

So maybe thats why its not working?

Yes, this is our server rules for the attack heli Kill-Limit 80 and K/D Limit 8
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by B-73*:

 

your code #1:

the limit will be enable from 9 till 15 o clock. the rest of the time is it disabled.

if you want to enable the limit around the time, then repace the code#1 with this:

Code:

true
your code #2:

the minKills is set on 100 to enable the limit/warnings. you can change this values. try this:

 

Code:

// set min kills
int minKills = 30;

// set max kills befor warn player
int warnPlayer = 10;

// set max kills to kick/ban
int kickPlayer = 15;
Ok so i can delete this code >>> Code:
((DateTime.Now.Hour >= 8) && (DateTime.Now.Hour < 5))
and replace it with >> Code:
true
And This is the right setting for my server?

 

Code:

// set min kills
int minKills = 30;

// set max kills befor warn player
int warnPlayer = 10;

// set max kills to kick/ban
int kickPlayer = 15;
How does this work and when?

 

 

Can you edit the code for me with warning, kill (with death), time-ban 10 days

Is't also possible to add a counter from 60 when there make kills?

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

Originally Posted by MrBird*:

 

Hi guys, I know that there is a voteban example in the insane limits example thread, but could someone help me tweak it a little bit?

 

I need a voteban that would ban a player permanently, and would like the voteban massage to show like "Player1 - Voteban initiated by Player2 for Reason"

 

I have been using the plug-in called Vote Ban, but it doesn't tell me who initiated the voteban, and there have been groups of players abusing the Vote Ban plug-in but vote banning whoever they don't like or if they just want to take that person's vehicle. So I'd like a voteban that includes the name of whoever initiated the vote, and the reason, so that I can punish that son of a gun.

 

Thanks!

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




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