Jump to content

Insane Limits: Player/Weapon (Sniper) Permission Lottery (not SQDM)


ImportBot

Recommended Posts

Originally Posted by PapaCharlie9*:

 

Is there any differance between that and just removing everything between the ""? I forgot about your reply and made some changes with help from some people :smile:

 

Also in Step 2 we separated the message into 2 lines:

Code:

plugin.SendGlobalMessage("This round's snipers: " + plugin.RoundData.getString(kWinners))
To:

Code:

plugin.SendGlobalMessage("This round's snipers:");
plugin.SendGlobalMessage(plugin.RoundData.getString(kWinners));
Is there maybe a way to separate the "winners" per team? And in that case can it even be set to just sen the list to the affected team?
Separating by team is a good idea. It makes the code twice as complicated, since everything has to be doubled, but yeah.

 

There is no difference, other then aesthetic, between "" and String.Empty.

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

Originally Posted by SirHitman*:

 

Added: "Write !sniperinfo for more info" to the kill message. Hope we can see some less questions ingame about why they got killed.

Step 1:

Code:

msg = killer.Name + ": You are not allowed to use sniper rifles this round!
Code:
msg = killer.Name + ": You are not allowed to use sniper rifles this round! Write !sniperinfo for more info";
Also we had some further ideas, if not all sniper slots are filled (after lottery is over) whoever writes !sniper gets the remaining slot. And if someone leaves during the round the slot can be taken by anyone entering the lottery. Might cause alot of !sniper spam on the server from people constantly trying to get possible slots and might not be that easy to fix ether.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Pvtjohntowle*:

 

Added: "Write !sniperinfo for more info" to the kill message. Hope we can see some less questions ingame about why they got killed.

Step 1:

Code:

msg = killer.Name + ": You are not allowed to use sniper rifles this round!
Code:
msg = killer.Name + ": You are not allowed to use sniper rifles this round! Write !sniperinfo for more info";
OK great idea, I like it and have implemented that into our code as well !! thanks for the advice
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LtMatt81*:

 

Hi Papa, can i have some help please?

 

Insane limits is telling me error compiling code. What have i done wrong?

 

/* Version 0.9/R2 BF4 */

if (!Regex.Match(kill.Weapon, @"(CS-LR4|SCAR-HSV|M40A5|M39EBR|QBU88|SVD12|RFB|MK11|SKS|GalilACE 53|SV98|JNG90|M98B|FY-JS|Scout|SRS|M200|L96A1|AMR2|AMR2_MED|M82A3|M82A3? CQB|M82A3_MED)", RegexOptions.IgnoreCase).Success) return false;

 

int SniperSquad = 5; // 5 is "Echo"

 

String[] SquadName = new String[]{

"None",

"Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel",

"India", "Juliet", "Kilo", "Lima", "Mike", "November", "Oscar", "Papa",

"Quebec", "Romeo", "Sierra", "Tango", "Uniform", "Victor", "Whiskey", "Xray",

"Yankee", "Zulu", "Haggard", "Sweetwater", "Preston", "Redford", "Faith", "Celeste"

};

 

String msg = "Only squad " + SquadName[sniperSquad] + " are allowed to use sniper rifles!";

 

if (killer.SquadId != SniperSquad) {

plugin.SendGlobalMessage(msg); // See note below

plugin.KillPlayer(killer.Name , 5);

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

Originally Posted by LtMatt81*:

 

Papa i change the code to this

 

 

/* Version 0.9/R2 BF4 */

if (!Regex.Match(kill.Weapon, @"(AMR2|AMR2_MED|CS-LR4|FY-JS|GalilACE53|JNG90|L96|M200|M39EBR|M40A5|M82A3|M8 2A3_CQB|M82A3_MED|M98B|MK11|QBU88|RFB|SCAR-HSV|SKS|SRS|SV98|SVD12)", RegexOptions.IgnoreCase).Success) return false;

 

int SniperSquad = 5; // 5 is "Echo"

 

String[] SquadName = new String[]{

"None",

"Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel",

"India", "Juliet", "Kilo", "Lima", "Mike", "November", "Oscar", "Papa",

"Quebec", "Romeo", "Sierra", "Tango", "Uniform", "Victor", "Whiskey", "Xray",

"Yankee", "Zulu", "Haggard", "Sweetwater", "Preston", "Redford", "Faith", "Celeste"

};

 

String msg = "Only squad " + SquadName[sniperSquad] + " are allowed to use sniper rifles!";

 

if (killer.SquadId != SniperSquad) {

plugin.SendGlobalMessage(killer.Name + ": " + msg); // See note below

plugin.KillPlayer(killer.Name , 5);

}

return false;

 

 

 

 

 

and the problem seemed to go away but now i have a new issue and it appears to be making procon lag and sometimes crash. What does this mean?

 

Posted Image

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

Originally Posted by PapaCharlie9*:

 

but now i have a new issue and it appears to be making procon lag and sometimes crash. What does this mean?

 

Posted Image

I have no idea, never seen that error before.

 

Try this: disable Insane Limits, exit Procon, restart Procon, select (highlight) some different plugin, like Spambot, then enable Insane Limits (click on the Insane Limits plugin checkbox, but don't highlight the "Insane Limits" plugin name). Let it run a few seconds. Does that help?

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

Originally Posted by PapaCharlie9*:

 

Ok papa it seems ok now.

 

Any idea how i can make it 2 snipers per team? Finding 5 is too many for TDM. Thanks.

Where did 5 come from? In the post #1 code, maxSnipers is set to 3. Change that to 2.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LtMatt81*:

 

Where did 5 come from? In the post #1 code, maxSnipers is set to 3. Change that to 2.

Sorry i just realised im not using whats in the OP. I'm using the Sniper limit code that you and that other fella created. Is it possible to modify that in someway to limit snipers to two per team or is the sniper lotto the only way to do this? THis is the code i currently have.

 

 

/* Version 0.9/R2 BF4 */

if (!Regex.Match(kill.Weapon, @"(AMR2|AMR2_MED|CS-LR4|FY-JS|GalilACE53|JNG90|L96|M200|M39EBR|M40A5|M82A3|M8 2A3_CQB|M82A3_MED|M98B|MK11|QBU88|RFB|SCAR-HSV|SKS|SRS|SV98|SVD12)", RegexOptions.IgnoreCase).Success) return false;

 

int SniperSquad = 5; // 5 is "Echo"

 

String[] SquadName = new String[]{

"None",

"Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel",

"India", "Juliet", "Kilo", "Lima", "Mike", "November", "Oscar", "Papa",

"Quebec", "Romeo", "Sierra", "Tango", "Uniform", "Victor", "Whiskey", "Xray",

"Yankee", "Zulu", "Haggard", "Sweetwater", "Preston", "Redford", "Faith", "Celeste"

};

 

String msg = "Only squad " + SquadName[sniperSquad] + " are allowed to use sniper rifles!";

 

if (killer.SquadId != SniperSquad) {

plugin.SendGlobalMessage(killer.Name + ": " + msg); // See note below

plugin.KillPlayer(killer.Name , 5);

}

return false;

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

Originally Posted by PapaCharlie9*:

 

Sorry i just realised im not using whats in the OP. I'm using the Sniper limit code that you and that other fella created. Is it possible to modify that in someway to limit snipers to two per team or is the sniper lotto the only way to do this? THis is the code i currently have.

 

 

/* Version 0.9/R2 BF4 */

if (!Regex.Match(kill.Weapon, @"(AMR2|AMR2_MED|CS-LR4|FY-JS|GalilACE53|JNG90|L96|M200|M39EBR|M40A5|M82A3|M8 2A3_CQB|M82A3_MED|M98B|MK11|QBU88|RFB|SCAR-HSV|SKS|SRS|SV98|SVD12)", RegexOptions.IgnoreCase).Success) return false;

 

int SniperSquad = 5; // 5 is "Echo"

 

String[] SquadName = new String[]{

"None",

"Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel",

"India", "Juliet", "Kilo", "Lima", "Mike", "November", "Oscar", "Papa",

"Quebec", "Romeo", "Sierra", "Tango", "Uniform", "Victor", "Whiskey", "Xray",

"Yankee", "Zulu", "Haggard", "Sweetwater", "Preston", "Redford", "Faith", "Celeste"

};

 

String msg = "Only squad " + SquadName[sniperSquad] + " are allowed to use sniper rifles!";

 

if (killer.SquadId != SniperSquad) {

plugin.SendGlobalMessage(killer.Name + ": " + msg); // See note below

plugin.KillPlayer(killer.Name , 5);

}

return false;

You are asking in the wrong thread. Ask in this one:

 

showthread....er-Squad-limit*

 

And please use code markup for code, it's hard to read otherwise. Just add

 

 



before the first line of code, and 


 

after the last line of code.

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

Originally Posted by SirHitman*:

 

Found a issue with the lotter. If someone writes !sniper in the end of the round (scoreboard) they are added in the list for the new round. This is a problem because most team-switching that happens in the end of round and makes it likely that there is more snipers on 1 team, it also makes it possible for someone to have 2 possible "tickets" in the lottery and in some cases also that person can also win the lottery 2 times (even thou I see 1 less sniper as a win :smile: this might an issue).

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

Originally Posted by PapaCharlie9*:

 

Found a issue with the lotter. If someone writes !sniper in the end of the round (scoreboard) they are added in the list for the new round. This is a problem because most team-switching that happens in the end of round and makes it likely that there is more snipers on 1 team, it also makes it possible for someone to have 2 possible "tickets" in the lottery and in some cases also that person can also win the lottery 2 times (even thou I see 1 less sniper as a win :smile: this might an issue).

Yes, there is a hole in the code that would allow that. If it really bothers you, you can add one additional limit to plug up that hole.

 

Create a new limit OnRoundStart, called "Plug Lotto Hole", leave Action set to None.

 

Set first_check to this Code:

 

Code:

String kState = "Lotto_State"; // plugin.RoundData int
String kEntries1 = "Lotto_Entries1"; // Team 1: plugin.RoundData Object (List<String>)
String kEntries2 = "Lotto_Entries2"; // Team 2: plugin.RoundData Object (List<String>)

if (plugin.RoundData.issetInt(kState)) plugin.RoundData.unsetInt(kState);
if (plugin.RoundData.issetObject(kEntries1)) plugin.RoundData.unsetObject(kEntries1);
if (plugin.RoundData.issetObject(kEntries2)) plugin.RoundData.unsetObject(kEntries2);
String msg = "All Lotto entries have been cleared!";
plugin.ConsoleWrite(msg);
plugin.SendGlobalMessage(msg);
return false;
* Restored post. It could be that the author is no longer active.
Link to comment
  • 1 month later...

Originally Posted by PapaCharlie9*:

 

?apa, you can add whitelist

In the OnKill limit, add this code at the very top, first line:

 

Code:

if (plugin.isInList(player.Name, "whitelist")) return false;
Then create a custom list called whitelist and fill it with the soldier names of players, separated by commas.
* Restored post. It could be that the author is no longer active.
Link to comment
  • 1 month later...

Originally Posted by TMiland*:

 

I have 2 questions:

 

1. Is this right to use in the onKill limit? Code:

bool sniperRifleUsed = (kill.Category == "SniperRifle");
2. What is Code:
String msg = "test";
supposed to be in both limits? :smile:

 

*Edit

i have included "DMR" as well:

 

Code:

bool sniperRifleUsed = (kill.Category == "SniperRifle" || kill.Category == "DMR");
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

I have 2 questions:

 

1. Is this right to use in the onKill limit?

Yes. I updated post #1 to use that instead.

 

2. What is Code:

String msg = "test";
supposed to be in both limits? :smile:
The msg variable is used by the ChatPlayer delegate that immediately follows. It's in the closure of the delegate. Think of it as a global variable used by inner functions.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Yes. I updated post #1 to use that instead.

 

 

The msg variable is used by the ChatPlayer delegate that immediately follows. It's in the closure of the delegate. Think of it as a global variable used by inner functions.

Okay chief, thanks! :biggrin:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Hi again, a question that came up;

 

If one of the snipers that have won the lottery decides not to go sniper, is there a way to give up the slot for a new sniper?

 

Something like "SniperPlayer gave up sniping, vote to get the free sniper slot!"

 

I was thinking to detect this, the "SniperPlayer" has to get a kill with a weapon in another group than "SniperRifle" or "DMR". :smile:

 

*Edit

After observing the chat all day, players are exploiting this limit by voting, get a spot and go another class the whole round, so no snipers can get the spot.

 

So the initial idea in this post would work around this exploit anyways. :P

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

Originally Posted by PapaCharlie9*:

 

Hi again, a question that came up;

 

If one of the snipers that have won the lottery decides not to go sniper, is there a way to give up the slot for a new sniper?

 

Something like "SniperPlayer gave up sniping, vote to get the free sniper slot!"

 

I was thinking to detect this, the "SniperPlayer" has to get a kill with a weapon in another group than "SniperRifle" or "DMR". :smile:

 

*Edit

After observing the chat all day, players are exploiting this limit by voting, get a spot and go another class the whole round, so no snipers can get the spot.

 

So the initial idea in this post would work around this exploit anyways. :P

It would be easy to punish a winner of the Lotto for not using the specified weapon category/type. It would be very difficult to replace the player with a different player.

 

I used kill for the punishment, but you can change it to Kick as indicated by the comment.

 

In the OnKill first_check Code, find the block of code below and make the changes in blue:

 

Code:

// State 2: Lottery is over, only winners may use sniper rifles
if (state == 2) {
    if (sniperRifleUsed && !plugin.RoundData.issetBool(key)) {
        msg = killer.Name + ": You are not allowed to use sniper rifles this round!";
        ChatPlayer(killer.Name);
        plugin.KillPlayer(killer.Name, 5);
        return false;    
    }
    if (!sniperRifleUsed && plugin.RoundData.issetBool(key)) {
        msg = killer.Name + ": You entered and won the lottery, you MUST use sniper rifles this round!";
        ChatPlayer(killer.Name);
        plugin.KillPlayer(killer.Name, 5);
        // plugin.KickPlayerWithMessage(killer.Name, "You entered and won the lottery, you MUST use sniper rifles!");
        return false;    
    }
}
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

It would be easy to punish a winner of the Lotto for not using the specified weapon category/type. It would be very difficult to replace the player with a different player.

 

I used kill for the punishment, but you can change it to Kick as indicated by the comment.

 

In the OnKill first_check Code, find the block of code below and make the changes in blue:

 

Code:

// State 2: Lottery is over, only winners may use sniper rifles
if (state == 2) {
    if (sniperRifleUsed && !plugin.RoundData.issetBool(key)) {
        msg = killer.Name + ": You are not allowed to use sniper rifles this round!";
        ChatPlayer(killer.Name);
        plugin.KillPlayer(killer.Name, 5);
        return false;    
    }
    if (!sniperRifleUsed && plugin.RoundData.issetBool(key)) {
        msg = killer.Name + ": You entered and won the lottery, you MUST use sniper rifles this round!";
        ChatPlayer(killer.Name);
        plugin.KillPlayer(killer.Name, 5);
        // plugin.KickPlayerWithMessage(killer.Name, "You entered and won the lottery, you MUST use sniper rifles!");
        return false;    
    }
}
That was a great way of solving that one! Thanks! :biggrin:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Got this message from a player: so fair enough with the sniper lottery, but being unable to use gadgets or sidearms...

 

How do we resolve that?

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

Originally Posted by PapaCharlie9*:

 

Got this message from a player: so fair enough with the sniper lottery, but being unable to use gadgets or sidearms...

 

How do we resolve that?

You mean a lottery winner getting punished for using a handgun? You know how to fix that. Add something like:

 

Code:

if (kill.Category == "Handgun") return false;
at an appropriate place early in OnKill. That lets anyone use a handgun, right?

 

I don't know what they mean by gadgets? What gadgets does Recon have that can kill? Crossbow? Whatever they are, just add them to the if statement above. Like if you want to allow grenades and knife:

 

Code:

if (kill.Category == "Handgun" || kill.Category == "Explosive" || kill.Weapon == "Melee") return false;
I don't know that you should let snipers kill with MAV and such. That's kind of borderline anyway.
* Restored post. It could be that the author is no longer active.
Link to comment
  • 3 weeks later...

Originally Posted by TMiland*:

 

You mean a lottery winner getting punished for using a handgun? You know how to fix that. Add something like:

 

Code:

if (kill.Category == "Handgun") return false;
at an appropriate place early in OnKill. That lets anyone use a handgun, right?

 

I don't know what they mean by gadgets? What gadgets does Recon have that can kill? Crossbow? Whatever they are, just add them to the if statement above. Like if you want to allow grenades and knife:

 

Code:

if (kill.Category == "Handgun" || kill.Category == "Explosive" || kill.Weapon == "Melee") return false;
I don't know that you should let snipers kill with MAV and such. That's kind of borderline anyway.
Thanks for this PC9, forgot all about it, but it is doing it's job, too well actually.

 

Problem now is: If player spawns as something else than sniper while waiting to get a spot, when he gets the sniper spot, he is killed for using something else than sniper, if he uses something else.

 

So, this is a punishment for entering the lottery so to say.

 

I am now trying to find a way to kill on second kill while killing with something else than sniper rifles.

 

This is what i have so far:

 

Code:

// State 2: Lottery is over, only winners may use sniper rifles
	if (state == 2) {
		if (sniperRifleUsed && !plugin.RoundData.issetBool(key)) {
			msg = killer.Name + ": You are not allowed to use sniper rifles this round!";
			ChatPlayer(killer.Name);
			plugin.KillPlayer(killer.Name, 5);
			return false;    
		}
		String kCounter = killer.Name + "_TreatAsOne_Count";
		TimeSpan time = TimeSpan.FromSeconds(3); // Activations within 3 seconds count as 1

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

		if (!sniperRifleUsed && plugin.RoundData.issetBool(key)) {
			if (warnings == 0) {
				msg = killer.Name + ": FIRST WARNING: You entered and won the lottery, you MUST use sniper rifles this round!";
				ChatPlayer(killer.Name);
				server.Data.setInt(kCounter, warnings+1);
				return false;
			}
			if (limit.Activations(killer.Name, time) > 1) return false;
			if (warnings == 1) {
					msg = plugin.R("FINAL WARNING %k_n%! You entered and won the lottery, you MUST use sniper rifles this round!"); // Second warning message
					plugin.ServerCommand("admin.say", msg, "player", killer.Name);
					plugin.SendPlayerYell(killer.Name, msg, 20);
					plugin.PRoConChat("ADMIN > " + msg);
					plugin.ConsoleWrite("^b^1ILLEGAL WEAPON!^0^n " + killer.FullName + " used " + kill.Weapon + " against " + victim.FullName);
					plugin.KillPlayer(killer.Name, 3);
			} else if (warnings == 2) {
					msg = plugin.R("Kicking %k_n% for ignoring warnings and killing with %w_n%!");
					plugin.SendGlobalMessage(msg);
					plugin.PRoConChat("ADMIN > " + msg);
					plugin.PRoConEvent(msg, "Insane Limits");
					plugin.KickPlayerWithMessage(killer.Name, msg);
			} else if (warnings > 2) {
					msg = plugin.R("TBANNING %k_n% for 30mins. Still not using SNIPER RIFLES after being kicked!");
					plugin.SendGlobalMessage(msg);
					plugin.PRoConChat("ADMIN > " + msg);
					plugin.PRoConEvent(msg, "Insane Limits");
					plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 30 /* minutes */, msg);
			}
			server.Data.setInt(kCounter, warnings+1);
			return false;
		}
	}
This is taken from the no explosives limit, but will it work as i think it would? :smile:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

This is what i have so far:

You have the right idea, but some stuff needs fixing. Try this.

Code:

// State 2: Lottery is over, only winners may use sniper rifles
	if (state == 2) {
		if (sniperRifleUsed && !plugin.RoundData.issetBool(key)) {
			msg = killer.Name + ": You are not allowed to use sniper rifles this round!";
			ChatPlayer(killer.Name);
			plugin.KillPlayer(killer.Name, 5);
			return false;    
		}
		String kCounter = killer.Name + "_LottoKillCount";
		int warnings = 0;
		if (server.RoundData.issetInt(kCounter)) warnings = server.RoundData.getInt(kCounter);

		if (!sniperRifleUsed && plugin.RoundData.issetBool(key)) {
			if (warnings == 0) {
				msg = killer.Name + ": FIRST WARNING: You entered and won the lottery, you MUST use sniper rifles this round!";
				ChatPlayer(killer.Name);
			} else if (warnings == 1) {
					msg = plugin.R("FINAL WARNING %k_n%! You entered and won the lottery, you MUST use sniper rifles this round!"); // Second warning message
					ChatPlayer(killer.Name);
					plugin.SendPlayerYell(killer.Name, msg, 20);
					plugin.KillPlayer(killer.Name, 3);
			} else if (warnings == 2) {
					msg = plugin.R("Kicking %k_n% for ignoring warnings and killing with %w_n%!");
					plugin.SendGlobalMessage(msg);
					plugin.PRoConChat("ADMIN > " + msg);
					plugin.PRoConEvent(msg, "Insane Limits");
					plugin.KickPlayerWithMessage(killer.Name, msg);
			} else if (warnings > 2) {
					msg = plugin.R("TBANNING %k_n% for 30mins. Still not using SNIPER RIFLES after being kicked!");
					plugin.SendGlobalMessage(msg);
					plugin.PRoConChat("ADMIN > " + msg);
					plugin.PRoConEvent(msg, "Insane Limits");
					plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 30 /* minutes */, msg);
			}
			server.RoundData.setInt(kCounter, warnings+1);
			return false;
		}
	}
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

You have the right idea, but some stuff needs fixing. Try this.

Code:

// State 2: Lottery is over, only winners may use sniper rifles
	if (state == 2) {
		if (sniperRifleUsed && !plugin.RoundData.issetBool(key)) {
			msg = killer.Name + ": You are not allowed to use sniper rifles this round!";
			ChatPlayer(killer.Name);
			plugin.KillPlayer(killer.Name, 5);
			return false;    
		}
		String kCounter = killer.Name + "_LottoKillCount";
		int warnings = 0;
		if (server.RoundData.issetInt(kCounter)) warnings = server.RoundData.getInt(kCounter);

		if (!sniperRifleUsed && plugin.RoundData.issetBool(key)) {
			if (warnings == 0) {
				msg = killer.Name + ": FIRST WARNING: You entered and won the lottery, you MUST use sniper rifles this round!";
				ChatPlayer(killer.Name);
			} else if (warnings == 1) {
					msg = plugin.R("FINAL WARNING %k_n%! You entered and won the lottery, you MUST use sniper rifles this round!"); // Second warning message
					ChatPlayer(killer.Name);
					plugin.SendPlayerYell(killer.Name, msg, 20);
					plugin.KillPlayer(killer.Name, 3);
			} else if (warnings == 2) {
					msg = plugin.R("Kicking %k_n% for ignoring warnings and killing with %w_n%!");
					plugin.SendGlobalMessage(msg);
					plugin.PRoConChat("ADMIN > " + msg);
					plugin.PRoConEvent(msg, "Insane Limits");
					plugin.KickPlayerWithMessage(killer.Name, msg);
			} else if (warnings > 2) {
					msg = plugin.R("TBANNING %k_n% for 30mins. Still not using SNIPER RIFLES after being kicked!");
					plugin.SendGlobalMessage(msg);
					plugin.PRoConChat("ADMIN > " + msg);
					plugin.PRoConEvent(msg, "Insane Limits");
					plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 30 /* minutes */, msg);
			}
			server.RoundData.setInt(kCounter, warnings+1);
			return false;
		}
	}
Thank you PC9! :biggrin:
* Restored post. It could be that the author is no longer active.
Link to comment
  • 3 months later...

Originally Posted by avengedthedead*:

 

Hello Papa,

 

Good day to you. I truly admire your work.

 

Need help. Can you create the same lottery in BF4 for (Sniper (all sniperrifles and DMR) + MORTAR + UCAV))?

* 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. I truly admire your work.

 

Need help. Can you create the same lottery in BF4 for (Sniper (all sniperrifles and DMR) + MORTAR + UCAV))?

I'll do the hard parts, you do all the easy parts, which are changing all the messages that refer to snipers to whatever makes more sense for your somewhat unique list.

 

For the plugin code, just find this line in Step 1:

 

Code:

bool sniperRifleUsed = (kill.Category == "SniperRifle");
And change it to this:

 

Code:

bool sniperRifleUsed = (kill.Category == "SniperRifle" || kill.Category == "DMR" || kill.Weapon == "M224" || kill.Weapon.Contains("UCAV"));
You will still use the !sniper command to start the lottery.

 

For the easy part, find all the message strings that refer to just snipers and change them. For example, in Step 1 you would find:

 

Code:

msg = "No sniping until after lottery: type !sniper to enter the lottery";
And change the message to whatever you want. They almost all start with msg = .
* 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.