Jump to content

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


ImportBot

Recommended Posts

Originally Posted by EdgarAllan*:

 

EDIT: Nevermind, it just appeared to be a server glitch.

 

So I changed all of the warning messages when a player kills with a non-pistol from a chat message (admin.say) to a yell message to the player (admin.yell) and they don't show up for the player. Did I overlook a semicolon or something anywhere? It seems only the yell messages directed publicly (stuff like "PISTOL MODE NOW ENGAGED") show up. Thanks

 

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 || kill.Category == "Handgun") 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.yell", "FINAL WARNING " + killer.Name + "! " + msg, "player", killer.Name);
        plugin.ServerCommand("admin.yell", 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 infraction will result in a ban!";
        plugin.ServerCommand("admin.yell", "FINAL WARNING " + killer.Name + "!" + msg, "player", killer.Name);
        plugin.ServerCommand("admin.yell", 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. 1 Hour.";
        plugin.SendGlobalMessage(msg);
        plugin.ServerCommand("admin.say", msg);
        plugin.PRoConChat("ADMIN > " + msg);
        plugin.PRoConEvent(msg, "Insane Limits");
	plugin.EABanPlayerWithMessage(EABanType.EA_GUID, EABanDuration.Temporary, killer.Name, 60, msg);
}
server.Data.setInt(kCounter, warnings+1);
return false;
* Restored post. It could be that the author is no longer active.
Link to comment
  • Replies 86
  • Created
  • Last Reply

Originally Posted by PapaCharlie9*:

 

EDIT: Nevermind, it just appeared to be a server glitch.

 

So I changed all of the warning messages when a player kills with a non-pistol from a chat message (admin.say) to a yell message to the player (admin.yell) and they don't show up for the player. Did I overlook a semicolon or something anywhere? It seems only the yell messages directed publicly (stuff like "PISTOL MODE NOW ENGAGED") show up. Thanks

 

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 || kill.Category == "Handgun") 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.yell", "FINAL WARNING " + killer.Name + "! " + msg, "player", killer.Name);
        plugin.ServerCommand("admin.yell", 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 infraction will result in a ban!";
        plugin.ServerCommand("admin.yell", "FINAL WARNING " + killer.Name + "!" + msg, "player", killer.Name);
        plugin.ServerCommand("admin.yell", 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. 1 Hour.";
        plugin.SendGlobalMessage(msg);
        plugin.ServerCommand("admin.say", msg);
        plugin.PRoConChat("ADMIN > " + msg);
        plugin.PRoConEvent(msg, "Insane Limits");
	plugin.EABanPlayerWithMessage(EABanType.EA_GUID, EABanDuration.Temporary, killer.Name, 60, msg);
}
server.Data.setInt(kCounter, warnings+1);
return false;
Whatever version you started with already had errors in it and it looks like you added more. :smile:

 

Try starting over with post #1. It already has yells in it, so there's nothing to change for that. What's not in post #1 that you need?

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

Originally Posted by Cheezis_Chrust*:

 

Hey guys,

 

I configured these for a Pistols, Knives, and Explosives only server - and after some testing with a friend they all seemed to work great. For a round or two, anyway.

 

After that, they just seemed to...stop working. I reloaded insane limits, restarted procon, double and truple checked virtual mode wasn't accidentally enabled...but it just doesn't seem to work again. (As of last night)

 

Can you please see if I made a mistake somewhere? I know this will take a few minutes, and I really appreciate it.

 

Thanks!

 

 

First limit, OnAnyChat

 

1st Code

 

Code:

/* VERSION R4 */

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*!weapons_\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("*** [WEAPON LOCK : ACTIVATED] ***");
	plugin.ServerCommand("admin.yell", "[WEAPON LOCK : ACTIVATED]");
               plugin.ServerCommand("vars.serverDescription", "::[iPwn] 24/7 TDM - Pistols, Knives, Explosives Only  [ON] Read the !rules");
               plugin.ServerCommand("vars.serverName", "::[iPwn] 24/7 TDM - Pistols, Knives, Explosives Only : [ON]");
} 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("*** [WEAPON LOCK : DEACTIVATED] ***");
	plugin.ServerCommand("admin.yell", "[WEAPON LOCK : DEACTIVATED]");
               plugin.ServerCommand("vars.serverDescription", "::[iPwn] 24/7 TDM - Pistols, Knives, Explosives Only  [OFF] (Weapons Free)");
               plugin.ServerCommand("vars.serverName", "::[iPwn] 24/7 TDM - Pistols, Knives, Explosives Only : [OFF]");
}

plugin.Data.setBool(kPistols, isPistolsOnly);

return false;
2nd limit, OnKill

 

1st Expression

Code:

(true)
2nd Code

Code:

/* VERSION R4 */

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|U_SW40|SW40|U_G18|U_93R|Melee|SEAL|U_RGO Impact|U_Grenade_RGO|U_M67|U_SRAW|U_MGL|U_NLAW|U_Repairtool|U_RPG7|U_SLAM|U_SMAW|AA Mine|U_Defib|U_Claymore|U_C4|U_MGL|U_M320 MGL|U_M320 HE|U_M320 LVG|U_M320 FB|U_XM25|U_M224 Mortar)", 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 = "WEAPONS ARE RESTRICTED TO PISTOLS/KNIVES/EXPLOSIVES";
        plugin.ServerCommand("admin.say", "FINAL WARNING " + killer.Name + "! " + msg, "player", killer.Name);
        plugin.ServerCommand("admin.yell", 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 = "WEAPONS ARE RESTRICTED TO PISOLS/KNIVES/EXPLOSIVES. YOU WILL BE BANNED IF YOU VIOLATE THIS RULE AGAIN";
        plugin.ServerCommand("admin.say", "FINAL WARNING " + killer.Name + "!" + msg, "player", killer.Name);
        plugin.ServerCommand("admin.yell", msg, "10", "player", killer.Name);
        plugin.PRoConChat("ADMIN to " + killer.Name + ">" + msg);
        plugin.KickPlayerWithMessage(killer.Name, msg);
} else {
        msg = "TEMP BAN: " + killer.Name + " RESTRICTED WEAPON";
        plugin.SendGlobalMessage(msg);
        plugin.ServerCommand("admin.yell", 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 PapaCharlie9*:

 

Hey guys,

 

I configured these for a Pistols, Knives, and Explosives only server - and after some testing with a friend they all seemed to work great. For a round or two, anyway.

 

After that, they just seemed to...stop working. I reloaded insane limits, restarted procon, double and truple checked virtual mode wasn't accidentally enabled...but it just doesn't seem to work again. (As of last night)

 

Can you please see if I made a mistake somewhere? I know this will take a few minutes, and I really appreciate it.

 

Thanks!

Which one isn't working? The !pistol on/off command, or the limit on weapon kills? After restarting everything, did an admin type in !pistols on? If not, that would explain why it is not working. :smile: It starts up turned off.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by EdgarAllan*:

 

Is there anything I can modify so this plugin does NOT punish for levelution type kills? We had a player get kicked when the killfeed read "Player1 KILLED Player2" with what I'm guessing was the exploding barrels.

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

Originally Posted by TMiland*:

 

Is there anything I can modify so this plugin does NOT punish for levelution type kills? We had a player get kicked when the killfeed read "Player1 KILLED Player2" with what I'm guessing was the exploding barrels.

Hi, this should be covered in the second check limit:

 

Code:

if (Regex.Match(kill.Weapon, @"(_:SoldierCollision,DamageArea,Suicide,RoadKill)", RegexOptions.IgnoreCase).Success) return false; // don't punish weird death cases
Can you post your second check code? :smile:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Hi, this should be covered in the second check limit:

 

Code:

if (Regex.Match(kill.Weapon, @"(_:SoldierCollision,DamageArea,Suicide,RoadKill)", RegexOptions.IgnoreCase).Success) return false; // don't punish weird death cases
Can you post your second check code? :smile:
That should be:

 

 

Code:

if (Regex.Match(kill.Weapon, @"(_:SoldierCollision|DamageArea|Suicide|RoadKill)", RegexOptions.IgnoreCase).Success) return false; // don't punish weird death cases
If you have the commas version, that would explain why it didn't work.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Cheezis_Chrust*:

 

Which one isn't working? The !pistol on/off command, or the limit on weapon kills? After restarting everything, did an admin type in !pistols on? If not, that would explain why it is not working. :smile: It starts up turned off.

The limit to kill.

 

It keeps giving me this:

 

[22:46:08 42] [insane Limits] Thread(settings): Compiling Limit #5 - PistolsKill - OnKill

[22:46:08 57] [insane Limits] Thread(settings): ERROR: 2 errors compiling Expression

[22:46:08 57] [insane Limits] Thread(settings): ERROR: (CS1026, line: 54, column: 56): ) expected

[22:46:08 57] [insane Limits] Thread(settings): ERROR: (CS1002, line: 54, column: 68): ; expected

 

 

The only expression on that limit is

 

Code:

(true)
And the second check is this code:

 

Code:

/* VERSION R4 */

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 || kill.Weapon == "U_M93R" || Regex.Match(kill.Weapon, @"(_:U_Taurus44|U_HK45C|U_CZ75|U_FN57|U_M1911|U_M9|U_MP412Rex|U_MP443|U_P226|U_QSZ92|U_SW40|SW40|U_G18|U_93R|Melee|SEAL|U_RGO Impact|U_Grenade_RGO|U_M67|U_SRAW|U_MGL|U_NLAW|U_Repairtool|U_RPG7|U_SLAM|U_SMAW|AA Mine|U_Defib|U_Claymore|U_C4|U_MGL|U_M320|M320|U_XM25|U_M224 Mortar)", RegexOptions.IgnoreCase).Success) return false;
if (plugin.isInList(player.Name, "admins") 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 = "WEAPONS ARE RESTRICTED TO PISTOLS/KNIVES/EXPLOSIVES";
        plugin.ServerCommand("admin.say", "FINAL WARNING " + killer.Name + "! " + msg, "player", killer.Name);
        plugin.ServerCommand("admin.yell", 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 = "WEAPONS ARE RESTRICTED TO PISOLS/KNIVES/EXPLOSIVES. YOU WILL BE BANNED IF YOU VIOLATE THIS RULE AGAIN";
        plugin.ServerCommand("admin.say", "FINAL WARNING " + killer.Name + "!" + msg, "player", killer.Name);
        plugin.ServerCommand("admin.yell", msg, "10", "player", killer.Name);
        plugin.PRoConChat("ADMIN to " + killer.Name + ">" + msg);
        plugin.KickPlayerWithMessage(killer.Name, msg);
} else {
        msg = "TEMP BAN: " + killer.Name + " RESTRICTED WEAPON";
        plugin.SendGlobalMessage(msg);
        plugin.ServerCommand("admin.yell", 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 PapaCharlie9*:

 

I tried again without this and it works

 

Code:

if (plugin.isInList(player.Name, "admins") return false
Any idea why?
Yes, sorry. That's a typo. It should be:

 

Code:

if (plugin.isInList(player.Name, "admins")) return false
It's missing a ), just like the error says.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by superg*:

 

Code:

if (!isPistolsOnly || kill.Category == "Handgun") return false;
I assume i can add other categories to the line above and it will work ok?

 

Code:

if (!isPistolsOnly || kill.Category == "Handgun|Melee|Explosive") return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Code:

if (!isPistolsOnly || kill.Category == "Handgun") return false;
I assume i can add other categories to the line above and it will work ok?

 

Code:

if (!isPistolsOnly || kill.Category == "Handgun|Melee|Explosive") return false;
Not exactly.

 

The "(X|Y|Z)" syntax is only for Regex.Match function calls.

 

If you already have a Regex.Match, like

 

Code:

if (!Regex.Match(kill.Category, "(Explosive|Impact)").Success) return false;
Then adding another item to match is easy:

 

Code:

if (!Regex.Match(kill.Category, "(Explosive|Impact|Melee)").Success) return false;
If you don't already have a Regex.Match, it's best to just add each individual new item as a new comparison:

 

Code:

if (!isPistolsOnly || kill.Category == "Handgun" || kill.Category == "Melee" || kill.Category == "Explosive") return false;
* Restored post. It could be that the author is no longer active.
Link to comment
  • 2 months later...

Originally Posted by avengedthedead*:

 

Hello Papa,

 

Good day to you.

 

Is it possible to make this limit like a special event in the round. When i type !pistol on there will be special series of countdown of 10 seconds before the mode is activated and run for like 10 mins (time can be edited) and again countdown of 10 seconds before the mode goes normal again (All weapons are free). This is for BF4.

 

What do you think? Is it possible? How i wish i have knowledge like you do.

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

Originally Posted by avengedthedead*:

 

Hello Papa,

 

Good day to you.

 

Is it possible to make this limit like a special event in the round. When i type !pistol on there will be special series of countdown of 10 seconds before the mode is activated and run for like 10 mins (time can be edited) and again countdown of 10 seconds before the mode goes normal again (All weapons are free). This is for BF4.

 

What do you think? Is it possible? How i wish i have knowledge like you do.

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

Originally Posted by PapaCharlie9*:

 

Hello Papa,

 

Good day to you.

 

Is it possible to make this limit like a special event in the round. When i type !pistol on there will be special series of countdown of 10 seconds before the mode is activated and run for like 10 mins (time can be edited) and again countdown of 10 seconds before the mode goes normal again (All weapons are free). This is for BF4.

 

What do you think? Is it possible? How i wish i have knowledge like you do.

It's possible, but difficult. Anything having to do with timers or countdowns is difficult. I don't have time to write a new version now, maybe someone else can?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by avengedthedead*:

 

It's possible, but difficult. Anything having to do with timers or countdowns is difficult. I don't have time to write a new version now, maybe someone else can?

Hello Papa,

 

Thank you for your reply. I understand.

 

I've tested this limit in my server and it has become very popular and all to your work. This is the reason why i would like to have the modification version if possible and i'm willing to donate/contribute to anyone who can make this possible.

 

Again how i wish that i have knowledge like you do. I admire your brilliance.

 

Regards,

 

Avengedthedead

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

Originally Posted by ParadoxCAV*:

 

If someone is sniping players on server with pistol mode on the admins would be able to snipe the sniper before he is able to kill a player that is following the rules. It's just something to help keep the game flowing without getting killed by other guns the entire time.

 

Getting a playername from very far has also proven difficult and this just seems like the best option.

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

Originally Posted by PapaCharlie9*:

 

If someone is sniping players on server with pistol mode on the admins would be able to snipe the sniper before he is able to kill a player that is following the rules. It's just something to help keep the game flowing without getting killed by other guns the entire time.

 

Getting a playername from very far has also proven difficult and this just seems like the best option.

Sniping with a pistol? Isn't that fair game when pistol mode is on? I'm still not understanding the situation.

 

If that is a real problem, are they all headshots? It would be possible to do automatic punishment for too many or even just one headshot.

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

Originally Posted by Chilace*:

 

How do I change this limit?

1) Show the punishment message in the public chat, not just killer

2) Punish by adminkill only (neither kick nor ban)

Thanks

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

Originally Posted by PapaCharlie9*:

 

How do I change this limit?

1) Show the punishment message in the public chat, not just killer

2) Punish by adminkill only (neither kick nor ban)

Thanks

In Step 3, OnKill second_check Code, find the comment that starts:

 

/*

The first time through, warnings is zero.

 

Replace from those lines all the way to the end with this:

 

Code:

/*
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.SendGlobalMessage("WARNING " + killer.Name + "! " + msg);
        plugin.SendGlobalYell(msg, 15);
        plugin.PRoConChat("ADMIN> " + 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 > 0) {
        msg = "Pistols only!";
        plugin.SendGlobalMessage("WARNING " + killer.Name + "!" + msg);
        plugin.SendGlobalYell(msg, 10);
        plugin.PRoConChat("ADMIN>" + msg);
	    plugin.KillPlayer(killer.Name, 5);
} 
server.Data.setInt(kCounter, warnings+1);
return false;
* Restored post. It could be that the author is no longer active.
Link to comment
  • 3 weeks later...

Originally Posted by Random_Digits*:

 

What is the Phantome Bow code for Insane Limits 0.2.17.0?

After three days searching, alas i've found nothing but the old regix code stuff.

Please help.

 

Code:

/* VERSION R4 */

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 || kill.Category == "Handgun" || kill.Category == "Melee" || kill.Category == "Knife" || kill.Category == "Phantom") 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 Bow/Pistol/Knife only!";
        plugin.ServerCommand("admin.say", "FINAL WARNING " + killer.Name + "! " + msg, "player", killer.Name);
        plugin.ServerCommand("admin.yell", 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/Bow only, next time you are Tbanned!";
        plugin.ServerCommand("admin.say", "FINAL WARNING " + killer.Name + "!" + msg, "player", killer.Name);
        plugin.ServerCommand("admin.yell", 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 proper weapon";
        plugin.SendGlobalMessage(msg);
        plugin.ServerCommand("admin.yell", 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 Random_Digits*:

 

I am running the script for Bow/Pistol/Knife. Knife and Pistol seem to work fine. But it still kills you on bow shots.

 

In the line:

 

if (!isPistolsOnly || kill.Category == "Handgun" || kill.Category == "Melee" || kill.Category == "Knife" || kill.Category == "Phantom") return false;

 

I have tried; Phantom, Bow, Phantom Bow, dlSHTR. Is my syntax incorrect?

 

Also, how do i Increase the warnings limit?

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