Jump to content

Insane Limits V0.8/R3: !pistols on/off command


ImportBot

Recommended Posts

Originally Posted by PapaCharlie9*:

 

That's a good idea. It's even simpler than that, since all you have to do is unset the counter.

 

Cornholio, try this for Step 2, OnAnyChat, first_check (and give thanks to Hexacanon for the idea):

 

Code:

/* VERSION 0.0.8/R3 */

String kPistols = "Pistols only toggle"; // plugin.Data bool
bool isPistolsOnly = false;

String tag = player.Tag;
if (tag.Length == 0) {
	// 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, "admins") && !plugin.isInList(tag, "admins")) return false;

Match m = Regex.Match(player.LastChat, @"^\s*!pistols_\s+(on|off)", RegexOptions.IgnoreCase);

if (!m.Success) return false;

String mode = m.Groups[1].Value;

if (mode == "on") {
	isPistolsOnly = true;
} else if (mode == "off") {
	isPistolsOnly = false;
}

if (isPistolsOnly) {
	plugin.SendGlobalMessage("*** PISTOLS ONLY MODE IS ON! ***");
	plugin.ServerCommand("admin.yell", "PISTOLS ONLY STARTING NOW!");
} else {
	List<PlayerInfoInterface> all = new List<PlayerInfoInterface>();
	all.AddRange(team1.players);
	all.AddRange(team2.players);
	if (team3.players.Count > 0) all.AddRange(team3.players);
	if (team4.players.Count > 0) all.AddRange(team4.players);

	foreach (PlayerInfoInterface p in all) {
		String kCounter = p.Name + "_TreatAsOne_Count_Pistol";
		if (server.Data.issetInt(kCounter)) server.Data.unsetInt(kCounter);
	}
	plugin.SendGlobalMessage("*** PISTOLS ONLY MODE IS OFF! ***");
	plugin.ServerCommand("admin.yell", "You can use any weapon now, no more pistols only");
}

plugin.Data.setBool(kPistols, isPistolsOnly);

return false;
If you changed all the "pistol" to "shotgun", make the same changes here. The most important part is getting the kCounter string right. If you used something other than "_TreatAsOne_Count_Pistol" in your Step 3, use that here instead.
* Restored post. It could be that the author is no longer active.
Link to comment
  • Replies 86
  • Created
  • Last Reply
  • 11 months later...

Originally Posted by miked0602*:

 

No reply on if it worked or not resetting the counter.

I will be testing this over the weekend and will update.

 

 

MY question or request is:

 

I am looking to combine commands into one limit.

Meaning just repeat the same original code with the modifications in each one for my custom modes.

This will allow one limit for all commands and one limit for each mode.

 

If it can be done that is.

I will experiment over the weekend while testing out your guys work so far!

 

Thanks for everything I have read and done with the info here guys.

 

DONT WANT TO NAME ONE AND FORGET ANY OTHERS SO THANKS TO ALL!

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

Originally Posted by miked0602*:

 

The initial live test of R3 with the proper weapons mods for bf4 is working. We are planning to run it full tilt tomorrow morning

 

Skipped ahead of schedule.

The pistols resetting of counter round to round was successful on the first attempt.

Will try again later on.

 

I have actually made 5 different commands with this example!

 

Thanks a lot guys.

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

Originally Posted by snufduck*:

 

First of all Best wishes for 2014 to all of you.

 

Will this script / command work on a battlefield 4 server ?

 

and for the admins list is this right what i have put down ?

 

Admin1,Admin2,Admin3,[TAG],

 

thanks for the reply

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

Originally Posted by miked0602*:

 

First of all Best wishes for 2014 to all of you.

 

Will this script / command work on a battlefield 4 server ?

 

and for the admins list is this right what i have put down ?

 

Admin1,Admin2,Admin3,[TAG],

 

thanks for the reply

No the admin s list should be the exact spelling of the admin name in game
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Is this working with BF4?

 

I cannot see it doing anything...

 

I have this for first:

Code:

/* VERSION 0.0.8/R2 */

String kPistols = "Knifes & Pistols only toggle"; // plugin.Data bool
bool isPistolsOnly = false;

String tag = player.Tag;
if (tag.Length == 0) {
	// 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, "admins") && !plugin.isInList(tag, "admins")) return false;

Match m = Regex.Match(player.LastChat, @"^\s*!pistols_\s+(on|off)", RegexOptions.IgnoreCase);

if (!m.Success) return false;

String mode = m.Groups[1].Value;

if (mode == "on") {
	isPistolsOnly = true;
} else if (mode == "off") {
	isPistolsOnly = false;
}

if (isPistolsOnly) {
	plugin.SendGlobalMessage("*** PISTOLS & KNIFE ONLY MODE IS ON! ***");
	plugin.ServerCommand("admin.say", "PISTOLS & KNIFE ONLY STARTING NOW!");
} else {
	plugin.SendGlobalMessage("*** PISTOLS & KNIFE ONLY MODE IS OFF! ***");
	plugin.ServerCommand("admin.say", "You can use any weapon now, no more pistols & knife only");
}

plugin.Data.setBool(kPistols, isPistolsOnly);

return false;
and second:

 

Code:

/* VERSION 0.0.8/R2 */

if (killer.Name == victim.Name) return false; // don't punish Suicides

if (Regex.Match(kill.Weapon, @"(_:SoldierCollision,DamageArea,Suicide,RoadKill)", RegexOptions.IgnoreCase).Success) return false; // don't punish weird death cases

String kPistols = "Pistols only toggle"; // plugin.Data bool
bool isPistolsOnly = false;

if (plugin.Data.issetBool(kPistols)) isPistolsOnly = plugin.Data.getBool(kPistols);

if (!isPistolsOnly || Regex.Match(kill.Weapon, @"(_:U_Taurus44|U_HK45C|U_CZ75|U_FN57|U_M1911|U_M9|U_MP412Rex|U_MP443|U_P226|U_QSZ92|Melee|Death|U_Defib)", RegexOptions.IgnoreCase).Success) return false;

String kCounter = killer.Name + "_TreatAsOne_Count_Pistol";
TimeSpan time = TimeSpan.FromSeconds(1); // Activations within 1 seconds count as 1
    
int warnings = 0;
if (server.Data.issetInt(kCounter)) warnings = server.Data.getInt(kCounter);

/*
The first time through, warnings is zero. Whether this is an isolated
activation or the first of a sequence of activations in a short period
of time, do something on this first time through.
*/
String msg = "none";
if (warnings == 0) {
        msg = "We are playing pistols only!";
        plugin.ServerCommand("admin.say", "FINAL WARNING " + killer.Name + "! " + msg, "player", killer.Name);
        plugin.ServerCommand("admin.say", msg, "15", "player", killer.Name);
        plugin.PRoConChat("ADMIN to " + killer.Name + "> " + msg);
	plugin.KillPlayer(killer.Name, 5);
        server.Data.setInt(kCounter, warnings+1);
        return false;
}

/*
The second and subsequent times through, check to make sure we are not
getting multiple activations in a short period of time. Ignore if
less than the time span required.
*/

if (limit.Activations(killer.Name, time) > 1) return false;

/*
We get here only if there was exactly one activation in the time span
*/

if (warnings == 1) {
        msg = "Knifes & Pistols only, next time you are banned!";
        plugin.ServerCommand("admin.say", "FINAL WARNING " + killer.Name + "!" + msg, "player", killer.Name);
        plugin.ServerCommand("admin.say", msg, "10", "player", killer.Name);
        plugin.PRoConChat("ADMIN to " + killer.Name + ">" + msg);
        plugin.KickPlayerWithMessage(killer.Name, msg);
} else {
        msg = "Temp banning " + killer.Name + " for not using knifes or pistols";
        plugin.SendGlobalMessage(msg);
        plugin.ServerCommand("admin.say", msg);
        plugin.PRoConChat("ADMIN > " + msg);
        plugin.PRoConEvent(msg, "Insane Limits");
	plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 10, msg);
}
server.Data.setInt(kCounter, warnings+1);
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by miked0602*:

 

Is this working with BF4?

 

I cannot see it doing anything...

The first check if you read through is checking chat for the keyphrase '!pistols on' or '!pistols off'

 

If that chat is made by anyone from the admin list it processes it successfully and moves down to check 2 to initiate the global message and activates/deactivated the PISTOLs/Knives ONLY mode.

if (!plugin.isInList(player.Name, "admins") && !plugin.isInList(tag, "admins")) return false;

 

Match m = Regex.Match(player.LastChat, @"^\s*!pistols_\s+(on|off)", RegexOptions.IgnoreCase);

This second check then looks for OnKill triggers that do not meet approved weapons

if (!isPistolsOnly || Regex.Match(kill.Weapon, @"(_:U_Taurus44|U_HK45C|U_CZ75|U_FN57|U_M1911|U_M9 |U_MP412Rex|U_MP443|U_P226|U_QSZ92|Melee|Death|U_D efib)", RegexOptions.IgnoreCase).Success) return false;

If one of those are used to kill, it does nothing.

If any other type of kill occurs it will process:

String kCounter = killer.Name + "_TreatAsOne_Count_Pistol";

TimeSpan time = TimeSpan.FromSeconds(1); // Activations within 1 seconds count as 1

 

int warnings = 0;

if (server.Data.issetInt(kCounter)) warnings = server.Data.getInt(kCounter);

 

/*

The first time through, warnings is zero. Whether this is an isolated

activation or the first of a sequence of activations in a short period

of time, do something on this first time through.

*/

String msg = "none";

if (warnings == 0) {

msg = "We are playing pistols only!";

plugin.ServerCommand("admin.say", "FINAL WARNING " + killer.Name + "! " + msg, "player", killer.Name);

plugin.ServerCommand("admin.say", msg, "15", "player", killer.Name);

plugin.PRoConChat("ADMIN to " + killer.Name + "> " + msg);

plugin.KillPlayer(killer.Name, 5);

server.Data.setInt(kCounter, warnings+1);

return false;

}

 

/*

The second and subsequent times through, check to make sure we are not

getting multiple activations in a short period of time. Ignore if

less than the time span required.

*/

 

if (limit.Activations(killer.Name, time) > 1) return false;

 

/*

We get here only if there was exactly one activation in the time span

*/

 

if (warnings == 1) {

msg = "Knifes & Pistols only, next time you are banned!";

plugin.ServerCommand("admin.say", "FINAL WARNING " + killer.Name + "!" + msg, "player", killer.Name);

plugin.ServerCommand("admin.say", msg, "10", "player", killer.Name);

plugin.PRoConChat("ADMIN to " + killer.Name + ">" + msg);

plugin.KickPlayerWithMessage(killer.Name, msg);

} else {

msg = "Temp banning " + killer.Name + " for not using knifes or pistols";

plugin.SendGlobalMessage(msg);

plugin.ServerCommand("admin.say", msg);

plugin.PRoConChat("ADMIN > " + msg);

plugin.PRoConEvent(msg, "Insane Limits");

plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 10, msg);

}

server.Data.setInt(kCounter, warnings+1);

return false;

That code processes how you treat the Violations.

At current the first V they get killed

On second they get an EABAN by name temp for 10 minutes.

 

I have changed mine to and EA guid temp ban for 20 minutes and include a better msg as to why they are temp banned.

 

 

HOPE THAT HELPS.

 

Without Papa around to reply, I can vouch for the code posted in the OP as of todays date.

I have tested it successfully and even edited it to add 8 other gamemodes so far.

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

Originally Posted by snufduck*:

 

No the admin s list should be the exact spelling of the admin name in game

i understand that the exact spelling must be used but i dont use the admin names on the forum ;-)

 

but will it work for battlefield 4 ?

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

Originally Posted by PapaCharlie9*:

 

Why do I need to reply, you guys are doing fine on your own. :smile:

 

I updated post #1 to use the R3 reset counter code and I added BF4 pistol codes. It's ready for BF4.

 

@snufduck: If you clan uses a tag, just use that all by itself. For example if your tag is [sNUF], just put this in the list:

 

Code:

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

Originally Posted by TMiland*:

 

Why do I need to reply, you guys are doing fine on your own. :smile:

 

I updated post #1 to use the R3 reset counter code and I added BF4 pistol codes. It's ready for BF4.

 

@snufduck: If you clan uses a tag, just use that all by itself. For example if your tag is [sNUF], just put this in the list:

 

Code:

SNUF
Thank you! :biggrin:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by miked0602*:

 

Why do I need to reply, you guys are doing fine on your own. :smile:

 

I updated post #1 to use the R3 reset counter code and I added BF4 pistol codes. It's ready for BF4.

 

@snufduck: If you clan uses a tag, just use that all by itself. For example if your tag is [sNUF], just put this in the list:

 

Code:

SNUF
Sorry Papa, after rereading that I can see it was worded wrong.

More like, without needing papa around to reply, I can vouch for the code in OP is working successfully......

 

 

LOLs.

 

and snuf, yes this does work for BF4.

And I just wanted to make sure you knew case-sensitive is needed in both the limit and in the list

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

Originally Posted by miked0602*:

 

Is it possible to define servernames when mode is on and off, and announce to the joining player that the mode is active? :smile:

Honestly, I would love to jump in and write stuff for ya but I read for over 50 hrs before creating and enabling my first limit. Then didn't ask a question for over a month....There are tons of examples here.

Please use the search feature first.

Then read and manually search by skimming

Try on your own......

read some more.

Then ask for help if needed.

 

 

That's how I conduct myself and others should try it.

 

Everything is possible.

favorite slogan: if man made it man can unmake it.

 

Reverse engineering lingo from the early haxor dayz!

ALL YOUR BASES ARE BELONG TO US

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

Originally Posted by TMiland*:

 

Honestly, I would love to jump in and write stuff for ya but I read for over 50 hrs before creating and enabling my first limit. Then didn't ask a question for over a month....There are tons of examples here.

Please use the search feature first.

Then read and manually search by skimming

Try on your own......

read some more.

Then ask for help if needed.

 

 

That's how I conduct myself and others should try it.

 

Everything is possible.

favorite slogan: if man made it man can unmake it.

 

Reverse engineering lingo from the early haxor dayz!

ALL YOUR BASES ARE BELONG TO US

Thanks for your honesty, i suggest you throw away your keyboard.

 

If i knew how to make this, i would have never asked (DOH!)

 

I haven't found a limit witch does what i was asking for, hence my question!

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

Originally Posted by miked0602*:

 

What you are asking for is basic and the information you need is probably in about 20+ threads over and over again.

You will have to look at the code to see what to pull, but thats the fun.

You will have to pull the proper code from the other ones and put it into this one in the proper place.

 

 

Throw away my keyboard?

How would I piss you off by telling you to educate yourself then?

 

LMAO at U

You would merely add a few lines to this code to accomplish that, but there are plenty of resources here if you would read.

 

I spent 10 hours reading through the entire Insane Limits Examples thread then another 10 on the Insane Limits Requests thread.

Then 30 hours of compiling and testing.....

 

I have never used programming languages in my life.

I have never ran nor admin'd my own server

I have never touched ProCon before December 2013.......

 

So if everyone that reads this thinks I am the one to throw away my keyboard, then I will succumb.

But I highly doubt thats going to be the reaction.

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

Originally Posted by TMiland*:

 

What you are asking for is basic and the information you need is probably in about 20+ threads over and over again.

You will have to look at the code to see what to pull, but thats the fun.

You will have to pull the proper code from the other ones and put it into this one in the proper place.

 

 

Throw away my keyboard?

How would I piss you off by telling you to educate yourself then?

 

LMAO at U

You would merely add a few lines to this code to accomplish that, but there are plenty of resources here if you would read.

 

I spent 10 hours reading through the entire Insane Limits Examples thread then another 10 on the Insane Limits Requests thread.

Then 30 hours of compiling and testing.....

 

I have never used programming languages in my life.

I have never ran nor admin'd my own server

I have never touched ProCon before December 2013.......

 

So if everyone that reads this thinks I am the one to throw away my keyboard, then I will succumb.

But I highly doubt thats going to be the reaction.

I do not care what you have done in your life, i am asking the thread owner a question, so please STFU!
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Wow the hostility?

I would have banned someone with such impatience

Wow the stupidity! No wonder i get hostile...

 

*edit

Can an admin please clean up this mess?

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

Originally Posted by PapaCharlie9*:

 

but i add the new code from the first post i typ the command and nothing happens..

 

see the attachmend for more info.

Looks like you named the list Admins, but the code wants it to be named admins. Either change the code or change the name of the list (the list is easier to change).
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Boys, boys, there's no need to fight.

 

miked is right that the info is out there for anyone who likes to be a do-it-yourselfer.

 

TM is right that asking for help when you are not a do-it-yourselfer is okay, I'm happy to help and most of the other do-it-yourselfers are also happy to help, e.g., supermillhouse, Rucki, Singh400, HexaCanon, etc.

 

I'm hoping miked will join the ranks of the do-it-yourselfers who help out everyone else.

 

Is it possible to define servernames when mode is on and off, and announce to the joining player that the mode is active?

Do you mean vars.serverName? That's the name of the server as it shows up in Battlelog Server Browser. You sure you want to change that, rather than vars.serverDescription, which shows in the full Battlelog Server page and in the logon page while a player is connecting? The latter seems better to me, but the code is the same either way. I'll do vars.serverDescription, but just change that to vars.serverName if that's what you prefer.

 

In Step 2, find this line of code and add the line in red:

 

Code:

plugin.SendGlobalMessage("*** PISTOLS ONLY MODE IS ON! ***");
        plugin.ServerCommand("vars.serverDescription", "Pistols only on this server, or be kicked!");
Find this other line of code and add this other line in red:

 

Code:

plugin.SendGlobalMessage("*** PISTOLS ONLY MODE IS OFF! ***");
        plugin.ServerCommand("vars.serverDescription", "Whatever your normal description is goes here");
Change the description to be what you want.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by miked0602*:

 

Thanks for the extra info for TM, Papa.

 

Thanks for the backup to a point, and maybe I could've taken care of that a different way.

But thats why you guys are here.

 

Again Thanks and I have no animosity toward TM, just hope he can take the initiative when there is soooo much info in just two threads.

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

Originally Posted by snufduck*:

 

Looks like you named the list Admins, but the code wants it to be named admins. Either change the code or change the name of the list (the list is easier to change).

Yes this whas the foult thanks for support :smile:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Do you mean vars.serverName? That's the name of the server as it shows up in Battlelog Server Browser. You sure you want to change that, rather than vars.serverDescription, which shows in the full Battlelog Server page and in the logon page while a player is connecting? The latter seems better to me, but the code is the same either way. I'll do vars.serverDescription, but just change that to vars.serverName if that's what you prefer.

 

In Step 2, find this line of code and add the line in red:

 

Code:

plugin.SendGlobalMessage("*** PISTOLS ONLY MODE IS ON! ***");
        plugin.ServerCommand("vars.serverDescription", "Pistols only on this server, or be kicked!");
Find this other line of code and add this other line in red:

 

Code:

plugin.SendGlobalMessage("*** PISTOLS ONLY MODE IS OFF! ***");
        plugin.ServerCommand("vars.serverDescription", "Whatever your normal description is goes here");
Change the description to be what you want.
That was a better idea yes! Thanks!

 

I changed all the admin.yells to admin.say, since it's not working yet in BF4. :smile:

 

I have the final code for pistols and knife only if anyone is interested:

 

OnAnyChat

Pistol Command:

Code:

Code:

/* VERSION 0.0.8/R3 */

String kPistols = "Pistols only toggle"; // plugin.Data bool
bool isPistolsOnly = false;

String tag = player.Tag;
if (tag.Length == 0) {
	// 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, "admins") && !plugin.isInList(tag, "admins")) return false;

Match m = Regex.Match(player.LastChat, @"^\s*!pistols_\s+(on|off)", RegexOptions.IgnoreCase);

if (!m.Success) return false;

String mode = m.Groups[1].Value;

if (mode == "on") {
	isPistolsOnly = true;
} else if (mode == "off") {
	isPistolsOnly = false;
}

if (isPistolsOnly) {
	plugin.SendGlobalMessage("*** PISTOLS & KNIFE ONLY MODE IS ON! ***");
	plugin.ServerCommand("vars.serverDescription", "Pistols & Knife only on this server for startup, check CHAT to see when it's normal again");
	plugin.ServerCommand("admin.say", "PISTOLS & KNIFE ONLY STARTING NOW!");
} else {
	List<PlayerInfoInterface> all = new List<PlayerInfoInterface>();
	all.AddRange(team1.players);
	all.AddRange(team2.players);
	if (team3.players.Count > 0) all.AddRange(team3.players);
	if (team4.players.Count > 0) all.AddRange(team4.players);

	foreach (PlayerInfoInterface p in all) {
		String kCounter = p.Name + "_TreatAsOne_Count_Pistol";
		if (server.Data.issetInt(kCounter)) server.Data.unsetInt(kCounter);
	}
	plugin.SendGlobalMessage("*** PISTOLS & KNIFE ONLY MODE IS OFF! ***");
	plugin.ServerCommand("vars.serverDescription", "Whatever your normal description is goes here");
	plugin.ServerCommand("admin.say", "You can use any weapon now, no more pistols & knife only");
}

plugin.Data.setBool(kPistols, isPistolsOnly);

return false;
Pistol kill

OnKill

First check Expression:

(true)

Second check

Code:

Code:

/* VERSION 0.0.8/R3 */

if (killer.Name == victim.Name) return false; // don't punish Suicides

if (Regex.Match(kill.Weapon, @"(_:SoldierCollision,DamageArea,Suicide,RoadKill)", RegexOptions.IgnoreCase).Success) return false; // don't punish weird death cases

String kPistols = "Pistols only toggle"; // plugin.Data bool
bool isPistolsOnly = false;

if (plugin.Data.issetBool(kPistols)) isPistolsOnly = plugin.Data.getBool(kPistols);

if (!isPistolsOnly || Regex.Match(kill.Weapon, @"(_:U_Taurus44|U_HK45C|U_CZ75|U_FN57|U_M1911|U_M9|U_MP412Rex|U_MP443|U_P226|U_QSZ92|Melee)", RegexOptions.IgnoreCase).Success) return false;

String kCounter = killer.Name + "_TreatAsOne_Count_Pistol";
TimeSpan time = TimeSpan.FromSeconds(1); // Activations within 1 seconds count as 1
    
int warnings = 0;
if (server.Data.issetInt(kCounter)) warnings = server.Data.getInt(kCounter);

/*
The first time through, warnings is zero. Whether this is an isolated
activation or the first of a sequence of activations in a short period
of time, do something on this first time through.
*/
String msg = "none";
if (warnings == 0) {
        msg = "We are playing pistols & Knife only!";
        plugin.ServerCommand("admin.say", "FINAL WARNING " + killer.Name + "! " + msg, "player", killer.Name);
        plugin.ServerCommand("admin.say", msg, "15", "player", killer.Name);
        plugin.PRoConChat("ADMIN to " + killer.Name + "> " + msg);
	plugin.KillPlayer(killer.Name, 5);
        server.Data.setInt(kCounter, warnings+1);
        return false;
}

/*
The second and subsequent times through, check to make sure we are not
getting multiple activations in a short period of time. Ignore if
less than the time span required.
*/

if (limit.Activations(killer.Name, time) > 1) return false;

/*
We get here only if there was exactly one activation in the time span
*/

if (warnings == 1) {
        msg = "Pistols & Knife only, next time you are banned!";
        plugin.ServerCommand("admin.say", "FINAL WARNING " + killer.Name + "!" + msg, "player", killer.Name);
        plugin.ServerCommand("admin.say", msg, "10", "player", killer.Name);
        plugin.PRoConChat("ADMIN to " + killer.Name + ">" + msg);
        plugin.KickPlayerWithMessage(killer.Name, msg);
} else {
        msg = "Temp banning " + killer.Name + " for not using a pistol or knife";
        plugin.SendGlobalMessage(msg);
        plugin.ServerCommand("admin.say", msg);
        plugin.PRoConChat("ADMIN > " + msg);
        plugin.PRoConEvent(msg, "Insane Limits");
	plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 10, msg);
}
server.Data.setInt(kCounter, warnings+1);
return false;
I'm going to use this for starting RUSH/DOM/TDM servers, as it adds more fun to the gameplay :biggrin:
* Restored post. It could be that the author is no longer active.
Link to comment
  • 2 months later...

Originally Posted by CDU-Rogue-Warrior*:

 

hrrrm, can someone else confirm/deny this

 

I am running Procon Rulz with the "!punish or !p / !forgive or !f" rule and when I try to turn !pistols on/off, as soon as i type the "!pistols on/off" command it thinks I am trying to punish someone

 

Anyone else getting this?

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

Originally Posted by PapaCharlie9*:

 

hrrrm, can someone else confirm/deny this

 

I am running Procon Rulz with the "!punish or !p / !forgive or !f" rule and when I try to turn !pistols on/off, as soon as i type the "!pistols on/off" command it thinks I am trying to punish someone

 

Anyone else getting this?

Try in the Rulz thread, since its the Rulz that is misfiring. This limit requires the full work !pistols, so it can't be the source of the problem.

 

BTW, if you are using BF4 and Insane Limits 0.9.16.0 or later, you can now handle all pistols forever without using individual codes. No need to update for DLC weapon additions, as long as Procon/BF4.defs is updated, this will always be up to date.

 

Find the line of code that has the BF4 pistol codes:

 

Code:

if (!isPistolsOnly || Regex.Match(kill.Weapon, @"(_:U_Taurus44|U_HK45C|U_CZ75|U_FN57|U_M1911|U_M9 |U_MP412Rex|U_MP443|U_P226|U_QSZ92)", RegexOptions.IgnoreCase).Success) return false;
Change it to this:

 

Code:

if (!isPistolsOnly || kill.Category == "Handgun") return false;
For shotguns instead of pistols only, use this:

 

Code:

if (!isPistolsOnly || kill.Category == "Shotgun") return false;
* 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.