Jump to content

Insane Limits Requests


ImportBot

Recommended Posts

  • Replies 3.2k
  • Created
  • Last Reply

Originally Posted by maxdralle*:

 

Hey, I posted a reply here but it didn't show up. I couldn't post in the original examples thread as it has been locked. Here's the link to the post with the voteban example tho: myrcon.net/...insane-limits-examples#entry18607

voteban its also possible with proconrulz. in this example you will see who initiated the voteban:

myrcon.net/.../voteban-function-proconrulz-voteban-for-in-game-chat-admin-protection

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

Originally Posted by lakaelo*:

 

i am searching about some kind of "server playtime announcer" but don´t know if there is any chance to have one. what i mean is, if a player is joining our server than he got a welcome message and i would like to have some message like "player XYZ have player 323 Hours on this server" is something like this possible?

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

Originally Posted by Dete96*:

 

i am searching about some kind of "server playtime announcer" but don´t know if there is any chance to have one. what i mean is, if a player is joining our server than he got a welcome message and i would like to have some message like "player XYZ have player 323 Hours on this server" is something like this possible?

It is possible with the statslogger plugin. Just see the manual...
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by cssqw7_3*:

 

Hello, I'm very understanding, this plugin is not I want to know whether this plugin can do some arms limitation

I want to use the plug-in use M224 limit server players, including the "VIP" in the server

My English is not very good, don't know whether my description is clear, I hope you can help me.

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

Originally Posted by Dete96*:

 

Hello, I'm very understanding, this plugin is not I want to know whether this plugin can do some arms limitation

I want to use the plug-in use M224 limit server players, including the "VIP" in the server

My English is not very good, don't know whether my description is clear, I hope you can help me.

Why don't you just use the ProCon rule I gave you a week ago?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by cssqw7_3*:

 

Why don't you just use the ProCon rule I gave you a week ago?

To use ProCon, of course, I was in, but can't use M224 ban "VIP", more misery is due to some relations, we can't deprive these VIP identity, I also want to use ProCon to limit "VIP" the use of some weapons, the same as the ordinary players.
* Restored post. It could be that the author is no longer active.
Link to comment
  • 1 month later...

Originally Posted by Pho3niX*:

 

@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;
Hello maxdrelle,

 

This is a nice and good script what i search for. I already ask this in the development section: showthread....-Kill-Limit-80*

 

Have a question about the first Limit. I want keep it active for the attack helicopter 24/7.

Do i must change the 1 limit ((DateTime.Now.Hour >= 9) && (DateTime.Now.Hour

 

And can you modify or fine tune the script more for the Attack Heli K/d 8 and Kill Limit 80

Thank you!

 

#thumbsup

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

Originally Posted by maxdralle*:

 

Hello maxdrelle,

 

This is a nice and good script what i search for. I already ask this in the development section: showthread....-Kill-Limit-80*

 

Have a question about the first Limit. I want keep it active for the attack helicopter 24/7.

Do i must change the 1 limit ((DateTime.Now.Hour >= 9) && (DateTime.Now.Hour

 

And can you modify or fine tune the script more for the Attack Heli K/d 8 and Kill Limit 80

Thank you!

 

#thumbsup

90% of the kill farmers dont care your warning messages. they join, they farm, thats it. it is a fix part of the map shanghai...

 

use a normal in game kd limit. like this:

insane limits, on kill, code

 

Code:

//////////////////////////////
// ingame kd farm limit
//////////////////////////////	
// SETTINGS:

// set max intern KDR
int maxKDR = 12;

// set min kills
int minKills = 30;

// set max warn messages before kick
int warnPlayer = 15;

bool useWhitelist = true;

// SETTINGS END
//////////////////////////////	

if(minKills > killer.KillsRound) return false;

if (useWhitelist && plugin.isInList(killer.Name, "whitelist_farm_limit")) return false;

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

if (server.RoundData.issetInt(kCounterWarn)) showWarnings = server.RoundData.getInt(kCounterWarn);

if((killer.KillsRound >= minKills) && (killer.KdrRound > maxKDR)) {
	showWarnings++;
	server.RoundData.setInt(kCounterWarn, showWarnings);
	//if (showWarnings%2 != 1) {return false;} 
	if ((showWarnings <= warnPlayer) ) {
		String globalMessage = killer.Name + " your current round KD is too high!";
		if (showWarnings + 5 >= warnPlayer) {globalMessage = globalMessage + " Change your play style / vehicle";}
		if (showWarnings == 1) {plugin.PRoConChat("^1^bKILL-FARM-LIMIT:^1^n " + killer.Name + " frist warning - (DEBUG: kdr: " + killer.KdrRound + "  k/d: " + killer.KillsRound + "/" + killer.DeathsRound + ")");}
		plugin.SendPlayerYell(killer.Name, "[KILL-FARM-LIMIT] [WARNING]\n" + globalMessage, 5);
		plugin.SendPlayerMessage(killer.Name, "KILL-FARM-LIMIT: [WARNING] " + globalMessage + " (max. round KD: " + maxKDR + ")");
		//return false;
	} else {
		plugin.SendGlobalMessage("KILL-FARM-LIMIT: " + killer.Name + " was KICKED for farming");
		plugin.ConsoleWrite("^8^bKILL-FARM-LIMIT:^8^n " + killer.Name + " KICKED for farming. (" + plugin.FriendlyMapName(server.MapFileName) + "  -  K/D: " + killer.KillsRound + "/" + killer.DeathsRound + "  -  (DEBUG: kdr: " + killer.KdrRound + "  k/d: " + killer.KillsRound + "/" + killer.DeathsRound + ")");
		plugin.PRoConChat("^8^bKILL-FARM-LIMIT:^8^n " + killer.Name + " KICKED for farming. (" + plugin.FriendlyMapName(server.MapFileName) + "  -  K/D: " + killer.KillsRound + "/" + killer.DeathsRound + "  -  (DEBUG: kdr: " + killer.KdrRound + "  k/d: " + killer.KillsRound + "/" + killer.DeathsRound + ")");
		plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 180, killer.Name + " > TIME BAN (3 hours) for kill farming! (K/D: " + killer.KillsRound + "/" + killer.DeathsRound + ")");
	}
}
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Pho3niX*:

 

Totaly agree with you. There dont care about and think only on 1 thing.

How does this script work for the attack Heli? Why i am asking this this is based on KDR, but we also use 80 kill limit.

 

Is this KDR global for all players? Normaly you must set the weapon key (vehicleair)

Can you also set Kill-Limit 80 in the script?

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

Originally Posted by Gazovik83*:

 

Hello world! Tell me is there any possibility to block a specific player to use certain weapons?

 

for example: Ivan m320 cannot be used, and if he uses his kill. And if uses three times his kick from the server

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

Originally Posted by LCARSx64*:

 

Hello world! Tell me is there any possibility to block a specific player to use certain weapons?

 

for example: Ivan m320 cannot be used, and if he uses his kill. And if uses three times his kick from the server

Change the red text to the player's in-game name:

 


Weapon Limit on Specific player

 

Create a new limit to evaluate OnKill. Set action to None.

 

Set first_check to this Code:

Code:

// Weapon Limit on Specific player
// v1.0 -  OnKill - Limit 1 of 1
//

String sPlayer = "[b]Ivan[/b]";
//
String sWeap = kill.Weapon;
String sKey = "_WLSP_";
String sMsg = "You are not allowed to use M320 launchers!";
int iCount = 0;

if (player.Name == sPlayer && (sWeap.Contains("_M320_") || sWeap == "U_MGL"))
{
    if (server.Data.issetInt(sKey)) iCount = server.Data.getInt(sKey);
    iCount++;
    if (iCount < 3)
    {
        plugin.SendPlayerYell(player.Name, "\n" + sMsg, 8);
        plugin.SendPlayerMessage(player.Name, sMsg);
        plugin.KillPlayer(player.Name);
    }
    else
    {
        plugin.KickPlayerWithMessage(player.Name, sMsg + "No more warnings!");
        iCount = 2;
    }
    server.Data.setInt(sKey, iCount);
}

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

Originally Posted by IceCold*:

 

Hello world! Tell me is there any possibility to block a specific player to use certain weapons?

 

for example: Ivan m320 cannot be used, and if he uses his kill. And if uses three times his kick from the server

why would you want rules for one person only ?

a bit unfair ?

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

Originally Posted by LCARSx64*:

 

How could I use this code to stop multiple player from using certain weapons? Would for example, I just add a" , " after Ivan and then add new players name?

Change the code to the following (for the additional players, look at the red highlighted code):

Code:

// Weapon Limit on Specific player
// v2.0 -  OnKill - Limit 1 of 1
//

List<String> sPlayers = new List<String>();
[b]// Add as many sPlayers.Add("PLAYER_NAME"); lines as required.
sPlayers.Add("Ivan");
sPlayers.Add("Player2");[/b]
//
String sWeap = kill.Weapon;
String sKey = "_WLSP_" + player.Name;
String sMsg = "You are not allowed to use M320 launchers!";
int iCount = 0;

if (sPlayers.Count > 0)
{
    if (sPlayers.Contains(player.Name) && (sWeap.Contains("_M320_") || sWeap == "U_MGL"))
    {
        if (server.Data.issetInt(sKey)) iCount = server.Data.getInt(sKey);
        iCount++;
        if (iCount < 3)
        {
            plugin.SendPlayerYell(player.Name, "\n" + sMsg, 8);
            plugin.SendPlayerMessage(player.Name, sMsg);
            plugin.KillPlayer(player.Name);
        }
        else
        {
            plugin.KickPlayerWithMessage(player.Name, sMsg + "No more warnings!");
            iCount = 2;
        }
        server.Data.setInt(sKey, iCount);
    }
}

return false;

why would you want rules for one person only ?

a bit unfair ?

I agree it is unfair however, I am here to supply requested code, not to judge.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Gazovik83*:

 

Change the code to the following (for the additional players, look at the red highlighted code):

Code:

// Weapon Limit on Specific player
// v2.0 -  OnKill - Limit 1 of 1
//

List<String> sPlayers = new List<String>();
[b]// Add as many sPlayers.Add("PLAYER_NAME"); lines as required.
sPlayers.Add("Ivan");
sPlayers.Add("Player2");[/b]
//
String sWeap = kill.Weapon;
String sKey = "_WLSP_" + player.Name;
String sMsg = "You are not allowed to use M320 launchers!";
int iCount = 0;

if (sPlayers.Count > 0)
{
    if (sPlayers.Contains(player.Name) && (sWeap.Contains("_M320_") || sWeap == "U_MGL"))
    {
        if (server.Data.issetInt(sKey)) iCount = server.Data.getInt(sKey);
        iCount++;
        if (iCount < 3)
        {
            plugin.SendPlayerYell(player.Name, "\n" + sMsg, 8);
            plugin.SendPlayerMessage(player.Name, sMsg);
            plugin.KillPlayer(player.Name);
        }
        else
        {
            plugin.KickPlayerWithMessage(player.Name, sMsg + "No more warnings!");
            iCount = 2;
        }
        server.Data.setInt(sKey, iCount);
    }
}

return false;
I agree it is unfair however, I am here to supply requested code, not to judge.
Thanks for the code! How to add other weapons?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Gazovik83*:

 

Use proconrulz if it is difficult to you to understand Insane Limits

Read the title of the topic! If you don't know the answer then give another answer! And I decide that I use!
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

Thanks for the code! How to add other weapons?

You will need to use the weapon codes found in the BF4.def file or ...*.

The codes are entered as:

Code:

WEAPCODE1|WEAPCODE2|WEAPCODE3|ETC.
Enter these codes in the the red highlighted part of the following code.

Don't forget to change the player message highlighted in green.

Code:

// Weapon Limit on Specific player
// v2.0 -  OnKill - Limit 1 of 1
//

// Example limiting Defibs and Phantom Bow.
String sWeaps = @"([b]U_Defib|dlSHTR[/b])";
List<String> sPlayers = new List<String>();
// Add as many sPlayers.Add("PLAYER_NAME"); lines as required.
sPlayers.Add("Ivan");
sPlayers.Add("Player2");
//
String sWeap = kill.Weapon;
String sKey = "_WLSP_" + player.Name;
String sMsg = "[b]You are not allowed to use M320 launchers, Defibs or Phantom Bow![/b]";
int iCount = 0;

if (sPlayers.Count > 0)
{
    if (sPlayers.Contains(player.Name) && (sWeap.Contains("_M320_") || sWeap == "U_MGL" || Regex.Match(kill.Weapon, sWeaps).Success))
    {
        if (server.Data.issetInt(sKey)) iCount = server.Data.getInt(sKey);
        iCount++;
        if (iCount < 3)
        {
            plugin.SendPlayerYell(player.Name, "\n" + sMsg, 8);
            plugin.SendPlayerMessage(player.Name, sMsg);
            plugin.KillPlayer(player.Name);
        }
        else
        {
            plugin.KickPlayerWithMessage(player.Name, sMsg + "No more warnings!");
            iCount = 2;
        }
        server.Data.setInt(sKey, iCount);
    }
}

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

Originally Posted by Gazovik83*:

 

You will need to use the weapon codes found in the BF4.def file or ...*.

The codes are entered as:

Code:

WEAPCODE1|WEAPCODE2|WEAPCODE3|ETC.
Enter these codes in the the red highlighted part of the following code.

Don't forget to change the player message highlighted in green.

Code:

// Weapon Limit on Specific player
// v2.0 -  OnKill - Limit 1 of 1
//

// Example limiting Defibs and Phantom Bow.
String sWeaps = @"([b]U_Defib|dlSHTR[/b])";
List<String> sPlayers = new List<String>();
// Add as many sPlayers.Add("PLAYER_NAME"); lines as required.
sPlayers.Add("Ivan");
sPlayers.Add("Player2");
//
String sWeap = kill.Weapon;
String sKey = "_WLSP_" + player.Name;
String sMsg = "[b]You are not allowed to use M320 launchers, Defibs or Phantom Bow![/b]";
int iCount = 0;

if (sPlayers.Count > 0)
{
    if (sPlayers.Contains(player.Name) && (sWeap.Contains("_M320_") || sWeap == "[b]U_CZ805_M320_3GL|U_M16A4_M320_HE|U_M16A4_M320_3GL[/b]" || Regex.Match(kill.Weapon, sWeaps).Success))
    {
        if (server.Data.issetInt(sKey)) iCount = server.Data.getInt(sKey);
        iCount++;
        if (iCount < 3)
        {
            plugin.SendPlayerYell(player.Name, "\n" + sMsg, 8);
            plugin.SendPlayerMessage(player.Name, sMsg);
            plugin.KillPlayer(player.Name);
        }
        else
        {
            plugin.KickPlayerWithMessage(player.Name, sMsg + "No more warnings!");
            iCount = 2;
        }
        server.Data.setInt(sKey, iCount);
    }
}

return false;
I respect the syntax right?

red highlighted

Code:

...
    if (sPlayers.Contains(player.Name) && (sWeap.Contains("[b]_M320_HE|_M320_3GL|_M320_LVG[/b]") || sWeap == "[b]U_CZ805_M320_3GL|U_M16A4_M320_HE|U_M16A4_M320_3GL[/b]" || Regex.Match(kill.Weapon, sWeaps).Success))
...
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

I respect the syntax right?

red highlighted

Code:

...
    if (sPlayers.Contains(player.Name) && (sWeap.Contains("[b]_M320_HE|_M320_3GL|_M320_LVG[/b]") || sWeap == "[b]U_CZ805_M320_3GL|U_M16A4_M320_HE|U_M16A4_M320_3GL[/b]" || Regex.Match(kill.Weapon, sWeaps).Success))
...
This is incorrect. That line should be:

Code:

if (sPlayers.Contains(player.Name) && (sWeap.Contains("_M320_") || sWeap == "U_MGL" || Regex.Match(kill.Weapon, sWeaps).Success))
This ensures that the M320 launcher attached to any weapon is not permitted.

To add any extra weapon limits (Defib and Phantom Bow as an example in the code), you need to change the line I highlighted in red in my previous post.

Code:

String sWeaps = @"(U_Defib|dlSHTR)";
For example, if you wanted to limit the EOD Bot, you'd change that line to:

Code:

String sWeaps = @"(U_EODBot|EODBot)";
If you wanted to limit Defib, Phantom Bow and EOD bot, you'd change it to:

Code:

String sWeaps = @"(U_Defib|dlSHTR|U_EODBot|EODBot)";
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Gazovik83*:

 

This is incorrect. That line should be:

Code:

if (sPlayers.Contains(player.Name) && (sWeap.Contains("_M320_") || sWeap == "U_MGL" || Regex.Match(kill.Weapon, sWeaps).Success))
This ensures that the M320 launcher attached to any weapon is not permitted.

To add any extra weapon limits (Defib and Phantom Bow as an example in the code), you need to change the line I highlighted in red in my previous post.

Code:

String sWeaps = @"(U_Defib|dlSHTR)";
For example, if you wanted to limit the EOD Bot, you'd change that line to:

Code:

String sWeaps = @"(U_EODBot|EODBot)";
If you wanted to limit Defib, Phantom Bow and EOD bot, you'd change it to:

Code:

String sWeaps = @"(U_Defib|dlSHTR|U_EODBot|EODBot)";
We have agreed to limit not all m320, only M320_HE, M320_3GL, M320_LVG

 

And weird but this code works))) However, does not reset the counter to 0 after kicking from the server

Code:

// Weapon Limit on Specific player
// v2.0 -  OnKill - Limit 1 of 1
//

// Example limiting Defibs and Phantom Bow.
String sWeaps = @"(U_FAMAS|U_AEK971_M320_HE|U_AEK971_M320_3GL|U_AK12_M320_HE|U_AK12_M320_3GL|U_CZ805_M320_HE|U_CZ805_M320_3GL|U_M16A4_M320_HE|U_M16A4_M320_3GL|U_M416_M320_HE|U_M416_M320_3GL|U_QBZ951_M320_HE|U_QBZ951_M320_3GL|U_SAR21_M320_HE|U_SAR21_M320_3GL|U_SCAR-H_M320_HE|U_SCAR-H_M320_3GL|U_SteyrAug_M320_HE|U_SteyrAug_M320_3GL|U_L85a2_M320_HE_V2|U_L85a2_M320_3GL_V2|U_AR160_M320_HE|U_AR160_M320_3GL|U_M320_HE|U_M320_3GL|U_M320_LVG|U_AEK971_M320_LVG|U_AK12_M320_LVG|U_CZ805_M320_LVG|U_M16A4_M320_LVG|U_M416_M320_LVG|U_QBZ951_M320_LVG|U_SAR21_M320_LVG|U_SCAR-H_M320_LVG|U_SteyrAug_M320_LVG|U_L85a2_M320_LVG_V2|U_AR160_M320_LVG)";
List<String> sPlayers = new List<String>();
// Add as many sPlayers.Add("PLAYER_NAME"); lines as required.
sPlayers.Add("sangangstar");
//sPlayers.Add("lllGAZGAZlll");
//
String sWeap = kill.Weapon;
String sKey = "_WLSP_" + player.Name;
String sMsg = "You are not allowed to use M320 launchers, Defibs or Phantom Bow!";
int iCount = 0;

if (sPlayers.Count > 0)
{
    if (sPlayers.Contains(player.Name) && (sWeap.Contains("_M320_HE|_M320_3GL|_M320_LVG") || sWeap == "U_FAMAS" || Regex.Match(kill.Weapon, sWeaps).Success))
    {
        if (server.Data.issetInt(sKey)) iCount = server.Data.getInt(sKey);
        iCount++;
        if (iCount < 3)
        {
            plugin.SendPlayerYell(player.Name, "\n" + sMsg, 8);
            plugin.SendPlayerMessage(player.Name, sMsg);
            plugin.KillPlayer(player.Name);
        }
        else
        {
            plugin.KickPlayerWithMessage(player.Name, sMsg + "No more warnings!");
            iCount = 2;
        }
        server.Data.setInt(sKey, iCount);
    }
}

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

Originally Posted by LCARSx64*:

 

We have agreed to limit not all m320, only M320_HE, M320_3GL, M320_LVG

 

And weird but this code works))) However, does not reset the counter to 0 after kicking from the server

Code:

// Weapon Limit on Specific player
// v2.0 -  OnKill - Limit 1 of 1
//

// Example limiting Defibs and Phantom Bow.
String sWeaps = @"(U_FAMAS|U_AEK971_M320_HE|U_AEK971_M320_3GL|U_AK12_M320_HE|U_AK12_M320_3GL|U_CZ805_M320_HE|U_CZ805_M320_3GL|U_M16A4_M320_HE|U_M16A4_M320_3GL|U_M416_M320_HE|U_M416_M320_3GL|U_QBZ951_M320_HE|U_QBZ951_M320_3GL|U_SAR21_M320_HE|U_SAR21_M320_3GL|U_SCAR-H_M320_HE|U_SCAR-H_M320_3GL|U_SteyrAug_M320_HE|U_SteyrAug_M320_3GL|U_L85a2_M320_HE_V2|U_L85a2_M320_3GL_V2|U_AR160_M320_HE|U_AR160_M320_3GL|U_M320_HE|U_M320_3GL|U_M320_LVG|U_AEK971_M320_LVG|U_AK12_M320_LVG|U_CZ805_M320_LVG|U_M16A4_M320_LVG|U_M416_M320_LVG|U_QBZ951_M320_LVG|U_SAR21_M320_LVG|U_SCAR-H_M320_LVG|U_SteyrAug_M320_LVG|U_L85a2_M320_LVG_V2|U_AR160_M320_LVG)";
List<String> sPlayers = new List<String>();
// Add as many sPlayers.Add("PLAYER_NAME"); lines as required.
sPlayers.Add("sangangstar");
//sPlayers.Add("lllGAZGAZlll");
//
String sWeap = kill.Weapon;
String sKey = "_WLSP_" + player.Name;
String sMsg = "You are not allowed to use M320 launchers, Defibs or Phantom Bow!";
int iCount = 0;

if (sPlayers.Count > 0)
{
    if (sPlayers.Contains(player.Name) && (sWeap.Contains("_M320_HE|_M320_3GL|_M320_LVG") || sWeap == "U_FAMAS" || Regex.Match(kill.Weapon, sWeaps).Success))
    {
        if (server.Data.issetInt(sKey)) iCount = server.Data.getInt(sKey);
        iCount++;
        if (iCount < 3)
        {
            plugin.SendPlayerYell(player.Name, "\n" + sMsg, 8);
            plugin.SendPlayerMessage(player.Name, sMsg);
            plugin.KillPlayer(player.Name);
        }
        else
        {
            plugin.KickPlayerWithMessage(player.Name, sMsg + "No more warnings!");
            iCount = 2;
        }
        server.Data.setInt(sKey, iCount);
    }
}

return false;
It is working because the kill.Weapon does not contain the exact string "_M320_HE|_M320_3GL|_M320_LVG".

Instead, use this code (Make sure to change the string highlighted in green to give a proper reason message):

Code:

// Weapon Limit on Specific player
// v2.0 -  OnKill - Limit 1 of 1
//

// Example limiting Defibs and Phantom Bow.
String sWeaps = @"(U_FAMAS|U_AEK971_M320_HE|U_AEK971_M320_3GL|U_AK12_M320_HE|U_AK12_M320_3GL|U_CZ805_M320_HE|U_CZ805_M320_3GL|U_M16A4_M320_HE|U_M16A4_M320_3GL|U_M416_M320_HE|U_M416_M320_3GL|U_QBZ951_M320_HE|U_QBZ951_M320_3GL|U_SAR21_M320_HE|U_SAR21_M320_3GL|U_SCAR-H_M320_HE|U_SCAR-H_M320_3GL|U_SteyrAug_M320_HE|U_SteyrAug_M320_3GL|U_L85a2_M320_HE_V2|U_L85a2_M320_3GL_V2|U_AR160_M320_HE|U_AR160_M320_3GL|U_M320_HE|U_M320_3GL|U_M320_LVG|U_AEK971_M320_LVG|U_AK12_M320_LVG|U_CZ805_M320_LVG|U_M16A4_M320_LVG|U_M416_M320_LVG|U_QBZ951_M320_LVG|U_SAR21_M320_LVG|U_SCAR-H_M320_LVG|U_SteyrAug_M320_LVG|U_L85a2_M320_LVG_V2|U_AR160_M320_LVG)";List<String> sPlayers = new List<String>();
// Add as many sPlayers.Add("PLAYER_NAME"); lines as required.
sPlayers.Add("sangangstar");
//
String sKey = "_WLSP_" + player.Name;
String sMsg = "[b]You are not allowed to use M320 launchers, Defibs or Phantom Bow![/b]";
int iCount = 0;

if (sPlayers.Count > 0)
{
    if (sPlayers.Contains(player.Name) && Regex.Match(kill.Weapon, sWeaps).Success)
    {
        if (server.Data.issetInt(sKey)) iCount = server.Data.getInt(sKey);
        iCount++;
        if (iCount < 3)
        {
            plugin.SendPlayerYell(player.Name, "\n" + sMsg, 8);
            plugin.SendPlayerMessage(player.Name, sMsg);
            plugin.KillPlayer(player.Name);
        }
        else
        {
            plugin.KickPlayerWithMessage(player.Name, sMsg + "No more warnings!");
            iCount = 2;
        }
        server.Data.setInt(sKey, iCount);
    }
}

return false;
The code is designed to remember that the player has already been given 3 warnings (2 kills and a kick) so that any additional breaches are instant kick. If you want it to reset then change:

Code:

iCount = 2;
to:

Code:

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

Originally Posted by Gazovik83*:

 

It is working because the kill.Weapon does not contain the exact string "_M320_HE|_M320_3GL|_M320_LVG".

Instead, use this code (Make sure to change the string highlighted in green to give a proper reason message):

Code:

// Weapon Limit on Specific player
// v2.0 -  OnKill - Limit 1 of 1
//

// Example limiting Defibs and Phantom Bow.
String sWeaps = @"(U_FAMAS|U_AEK971_M320_HE|U_AEK971_M320_3GL|U_AK12_M320_HE|U_AK12_M320_3GL|U_CZ805_M320_HE|U_CZ805_M320_3GL|U_M16A4_M320_HE|U_M16A4_M320_3GL|U_M416_M320_HE|U_M416_M320_3GL|U_QBZ951_M320_HE|U_QBZ951_M320_3GL|U_SAR21_M320_HE|U_SAR21_M320_3GL|U_SCAR-H_M320_HE|U_SCAR-H_M320_3GL|U_SteyrAug_M320_HE|U_SteyrAug_M320_3GL|U_L85a2_M320_HE_V2|U_L85a2_M320_3GL_V2|U_AR160_M320_HE|U_AR160_M320_3GL|U_M320_HE|U_M320_3GL|U_M320_LVG|U_AEK971_M320_LVG|U_AK12_M320_LVG|U_CZ805_M320_LVG|U_M16A4_M320_LVG|U_M416_M320_LVG|U_QBZ951_M320_LVG|U_SAR21_M320_LVG|U_SCAR-H_M320_LVG|U_SteyrAug_M320_LVG|U_L85a2_M320_LVG_V2|U_AR160_M320_LVG)";List<String> sPlayers = new List<String>();
// Add as many sPlayers.Add("PLAYER_NAME"); lines as required.
sPlayers.Add("sangangstar");
//
String sKey = "_WLSP_" + player.Name;
String sMsg = "[b]You are not allowed to use M320 launchers, Defibs or Phantom Bow![/b]";
int iCount = 0;

if (sPlayers.Count > 0)
{
    if (sPlayers.Contains(player.Name) && Regex.Match(kill.Weapon, sWeaps).Success)
    {
        if (server.Data.issetInt(sKey)) iCount = server.Data.getInt(sKey);
        iCount++;
        if (iCount < 3)
        {
            plugin.SendPlayerYell(player.Name, "\n" + sMsg, 8);
            plugin.SendPlayerMessage(player.Name, sMsg);
            plugin.KillPlayer(player.Name);
        }
        else
        {
            plugin.KickPlayerWithMessage(player.Name, sMsg + "No more warnings!");
            iCount = 2;
        }
        server.Data.setInt(sKey, iCount);
    }
}

return false;
The code is designed to remember that the player has already been given 3 warnings (2 kills and a kick) so that any additional breaches are instant kick. If you want it to reset then change:

Code:

iCount = 2;
to:

Code:

iCount = 0;
Thank you so much for your help!
* Restored post. It could be that the author is no longer active.
Link to comment
  • 2 weeks later...

Originally Posted by spatieman*:

 

PC9 , you remember this thread? myrcon.net/...insane-limits-examples#entry18540

 

I am using IL 0.9.17.0

 

Code:

double highKdr = 6.0;
    double highSpm = 800;
    
    if ( player.KdrRound > highKdr && player.Kdr > highKdr && player.Spm > highSpm ) {
        String reason = "in-round KDR=" + player.KdrRound + " exceeds server limit of " + highKdr + "!";
        String message = plugin.R("Banning %p_fn% for ") + reason;
        plugin.SendGlobalMessage(message);
        plugin.ConsoleWrite(@"^4 " + message + @" ^0 (Battlelog KDR=" + player.Kdr + ", SPM=" + player.Spm + " > " + highSpm + ")");
        plugin.PBBanPlayerWithMessage(PBBanDuration.Permanent, player.Name, 0, reason);
    }
    return false;
But for some reason i get compile errors on it.

 

Code:

[19:49:58 24] [Insane Limits] ERROR: 4 errors compiling Expression
[19:49:58 24] [Insane Limits] ERROR: (CS1026, line: 42, column: 30):  ) is aspected
[19:49:58 24] [Insane Limits] ERROR: (CS1525, line: 52, column: 18):  invalid expresion term )
[19:49:58 24] [Insane Limits] ERROR: (CS1002, line: 52, column: 27):  ; is aspected
[19:49:58 24] [Insane Limits] ERROR: (CS1525, line: 52, column: 27):  invalid expression term )
[19:50:47 40] [Insane Limits] Compiling Limit #6 - Ban High In-Round KDR Killer - OnSpawn
(sorry wrong translation,if any)

 

or is the code only for previous versions

 

nvr mind,, found it

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

Originally Posted by spatieman*:

 

2 questions..

1: is there a RTFM for learning to proper code in insane limits ?

2: Is insane limits able to read a proconrulz.ini file for fetching stuff what is written in it to work with?

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

Originally Posted by LCARSx64*:

 

2 questions..

1: is there a RTFM for learning to proper code in insane limits ?

2: Is insane limits able to read a proconrulz.ini file for fetching stuff what is written in it to work with?

  • Limits for insane limits are written in C# so I would suggest learning that language. Just google for C# Tutorials for beginners, here is one such tutorial:

  • You can read the proconrulz.ini file in from Insane Limits code but it won't understand the rulz, you're better off either just using ProconRulz or manually translating the rulz to Insane Limits.
* 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.