Jump to content

Insane Limits Requests


ImportBot

Recommended Posts

  • Replies 3.2k
  • Created
  • Last Reply

Originally Posted by DoMMike*:

 

Reposting, I posted this already in the wrong section,

 

I'm looking for rule that would tban (time 9999) players rank 0 - 45 when the server reaches 32 player count Reason too Noob.

 

2nd When a player reaches 20 death/Kills and has a kdr less then 0.15 Tban (Time 9999) reason Too Noob example of this please see attached picture player name KazPlayOnlykozplayer.png

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

Originally Posted by PapaCharlie9*:

 

Hello I want a code similar to this, but I want to kick for a kdr higher then 3.0 and kick players between rank 0 - 45 after the server reaches 32 players.

 

// Limit Player's KDR & Rank

 

double maxKDR = 1.1; // Maximum KD, anyone with higher is kicked

double maxRank = 99; // Maximum Rank, anyone with higher is kicked

 

String[] msgs = { "Sorry, your ",

" is higher than ",

"KDR",

"Rank" };

 

if (player.Kdr > maxKDR || player.Rank > maxRank)

{

String kMsg = msgs[0];

if (player.Kdr > maxKDR)

{

kMsg = kMsg + msgs[2] + msgs[1] + maxKDR.ToString("F1");

}

else

{

kMsg = kMsg + msgs[3] + msgs[1] + maxRank.ToString();

}

plugin.KickPlayerWithMessage(player.Name, kMsg);

}

return false;

 

or will this work? and how would I make this work after 32 players join.

 

(player.Kdr > 3.1 || player.Rank

You need to be clearer about what logic you intend. I can interpret your request at least 3 ways:

 

1) Kick KDR over 3.0 always. Also, if more than 32 players in the server, kick noobs equal or less than 45 rank.

 

2) If the server has 32 players or more, kick KDR 3.0 and over AND kick noobs equal or less than 45 rank (regardless of their KDR).

 

3) If a player has KDR over 3.0 AND rank 45 or less, kick if server has more than 32 players.

 

Which do you mean?

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

Originally Posted by PapaCharlie9*:

 

Can I get a temp ban 999 for bad kdr reason too Noob. for anyone with a combo of 20 death or kills (e.g 2 and 18) 0.10 kdr or less see KazplayOnly as an example.

kozplayer.png

Make a separate limit OnDeath and use this expression in first_check:

 

Code:

((player.KillsRound + player.DeathsRound) >= 20) && player.KdrRound <= 0.10)
Then set the Action to temp ban as you like.

 

BTW, you used player.Kdr (Battlelog KDR) in your previous request, but here you want in-round KDR. Is that what you really meant, in either case?

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

Originally Posted by LCARSx64*:

 

Hello I want a code similar to this, but I want to kick for a kdr higher then 3.0 and kick players between rank 0 - 45 after the server reaches 32 players.

 

// Limit Player's KDR & Rank

 

double maxKDR = 1.1; // Maximum KD, anyone with higher is kicked

double maxRank = 99; // Maximum Rank, anyone with higher is kicked

 

String[] msgs = { "Sorry, your ",

" is higher than ",

"KDR",

"Rank" };

 

if (player.Kdr > maxKDR || player.Rank > maxRank)

{

String kMsg = msgs[0];

if (player.Kdr > maxKDR)

{

kMsg = kMsg + msgs[2] + msgs[1] + maxKDR.ToString("F1");

}

else

{

kMsg = kMsg + msgs[3] + msgs[1] + maxRank.ToString();

}

plugin.KickPlayerWithMessage(player.Name, kMsg);

}

return false;

 

or will this work? and how would I make this work after 32 players join.

 

(player.Kdr > 3.1 || player.Rank

Correct me if I'm wrong, but isn't that my code?

Please describe what you're after more precisely and with exact details.

 

Sent from Samsung Galaxy S5 using Tapatalk

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

Originally Posted by DoMMike*:

 

Make a separate limit OnDeath and use this expression in first_check:

 

Code:

((player.KillsRound + player.DeathsRound) >= 20) && player.KdrRound <= 0.10)
Then set the Action to temp ban as you like.

 

BTW, you used player.Kdr (Battlelog KDR) in your previous request, but here you want in-round KDR. Is that what you really meant, in either case?

Thank you for above, yes I wanted in round kdr and battlelog kdr for over 3.0

 

You need to be clearer about what logic you intend. I can interpret your request at least 3 ways:

 

1) Kick KDR over 3.0 always. Also, if more than 32 players in the server, kick noobs equal or less than 45 rank.

 

2) If the server has 32 players or more, kick KDR 3.0 and over AND kick noobs equal or less than 45 rank (regardless of their KDR).

 

3) If a player has KDR over 3.0 AND rank 45 or less, kick if server has more than 32 players.

 

Which do you mean?

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

Originally Posted by 397Seth*:

 

Hello and merry christmas to everyone,

 

I am planing on using premium maps from now on. I do this with UMM in the evening.

My question is:

Is it possible to programm a limit that allows me to send yell messages on a certain time?

 

For example:

Premium maps start at 7 in the evening. I would like to post three yell messages: @6, 630 and 645.

 

Can I do that?

 

Happy Holidays

 

I tried to adapt from the automatic server restart:

 

OnIntervallServer 300

 

Code:

int Hour24Clock = 18;  // CHANGE: 0 to 23 o'clock, 3 is 3AM, 15 is 3PM
String ChatMessage = "Premium Maps will be active at 19:00"; // CHANGE
String YellMessage = "Premium Maps will be active at 19:00"; // CHANGE
int YellDuration = 10; // CHANGE

// If it's the appointed hour and a restart has not happened in the last 24 hours ...
if (DateTime.Now.Hour == Hour24Clock) 
{
    Thread messenger = new Thread(new ThreadStart(delegate {
        try {
            plugin.PRoConChat("ADMIN > " + ChatMessage);
            plugin.SendGlobalMessage(ChatMessage);
            plugin.SendGlobalYell(YellMessage, YellDuration);
            Thread.Sleep(1800 * 1000);
            plugin.PRoConChat("ADMIN > " + ChatMessage);
            plugin.SendGlobalMessage(ChatMessage);
            plugin.SendGlobalYell(YellMessage, YellDuration);
            Thread.Sleep(900 * 1000);
            plugin.PRoConChat("ADMIN > " + ChatMessage);
            plugin.SendGlobalMessage(ChatMessage);
            plugin.SendGlobalYell(YellMessage, YellDuration);
        } catch (Exception) {}
    }));
    messenger.Name = "RestartMessenger";
    messenger.Start();

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

Originally Posted by DoMMike*:

 

Make a separate limit OnDeath and use this expression in first_check:

 

Code:

((player.KillsRound + player.DeathsRound) >= 20) && player.KdrRound <= 0.10)
Then set the Action to temp ban as you like.

 

BTW, you used player.Kdr (Battlelog KDR) in your previous request, but here you want in-round KDR. Is that what you really meant, in either case?

It didn't work, I made one change not sure if it will work,

 

[00:05:59 39] [insane Limits] Thread(fetch): DONE inserting 1 new players, 0 still in queue, took a total of 1 secs

[00:06:24 94] [insane Limits] Thread(settings): Compiling Limit #2 - Too Noob - OnDeath

[00:06:25 01] [insane Limits] Thread(settings): ERROR: 2 errors compiling Expression

[00:06:25 01] [insane Limits] Thread(settings): ERROR: (CS1002, line: 27, column: 108): ; expected

[00:06:25 01] [insane Limits] Thread(settings): ERROR: (CS1525, line: 27, column: 108): Invalid expression term ')'

 

Change I made below, removed ")" after the 20

 

((player.KillsRound + player.DeathsRound) >= 20 && player.KdrRound

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

Originally Posted by VBK-Clan*:

 

Hello Dear Procon Community

first Merry Christmas and Happy New Year (wen is so far), I wish all of you.

I have a problem with rule-following

I will forbid us to a server all shootguns m320 grenade claymoor Rpg and c4

However, it is not can someone help me please?

can someone tell me how I ever whim a weapon can forbid?

 

Set first_check to this Expression:

 

Code:

Regex.Match(kill.Weapon,@(m320|smaw|rpg|U_AK12_M32 0|U_M18|U_V40|U_Grenade_RGO|U_QBS09|U_SerbuShorty| U_SPAS12|U_DAO12|U_UTAS|U_USAS_12_Nightvision|U_US AS_12|U_SAIGA_20K|U_M1014|U_HAWK|U_DBV12|U_870|U_M 67|U_AK12_M320_HE|U_AK12_M320_LVG|U_AK12_M320_SHG| U_AK12_M320_SMK|U_C4_Support|U_CZ805_M320_HE|U_CZ8 05_M320_LVG|U_CZ805_M320_SHG|U_Claymore|U_Claymore _Recon|U_L85A2_M320_FLASH_v2|U_L85A2_M320_HE_v2|U? L85A2_M320_LVG_v2|U_L85A2_M320_SHG_v2|U_M16A4_M26? Frag|U_M16A4_M26_Slug|U_M16A4_M320_HE|U_M16A4_M320 _LVG|U_M16A4_M320_SHG|U_M320_FLASH|U_M320_HE|U_M32 0_LVG|U_M320_SHG|U_M320_SMK|U_M416_M26_Frag|U_M416 _M26_Slug|U_M416_M320_FLASH|U_M416_M320_HE|U_M416? M320_LVG|U_M416_M320_SHG|U_M416_M320_SMK|U_USAS_12 |U_USAS_12_Nightvision|U_UTAS|U_Ultimax|U_V40|U_XM 25|U_XM25_Flechette|U_XM25_Smoke|U_SteyrAug_M320_F LASH|U_SteyrAug_M320_HE|U_SteyrAug_M320_LVG|U_Stey rAug_M320_SHG|U_SteyrAug_M320_SMK)",RegexOptions.I gnoreCase).Success

 

Set second_check to this Code:

 

Code:

if (limit.Data.issetBool(player.Name))

{

plugin.SendGlobalMessage(plugin.R("%p_n% has been banned for using %w_n%, after a kick!"));

plugin.PBBanPlayerWithMessage(PBBanDuration.Tempor ary, player.Name, 15, plugin.R("%p_n% you have been banned for 15 minutes for using %w_n%"));

limit.Data.unsetBool(player.Name);

}

 

int count = (int) limit.Activations(player.Name);

 

if (count == 1)

{

plugin.SendGlobalMessage(plugin.R("%p_n% do not use %w_n%!"));

plugin.KillPlayer(player.Name);

}

else if (count == 2)

{

plugin.SendGlobalMessage(plugin.R("%p_n% has been kicked for using %w_n%"));

plugin.KickPlayerWithMessage(player.Name, plugin.R("%p_n% you have been kicked for using %w_n%"));

 

if (!limit.Data.issetBool(player.Name))

limit.Data.setBool(player.Name, true);

}

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

Originally Posted by PapaCharlie9*:

 

It didn't work, I made one change not sure if it will work,

 

[00:05:59 39] [insane Limits] Thread(fetch): DONE inserting 1 new players, 0 still in queue, took a total of 1 secs

[00:06:24 94] [insane Limits] Thread(settings): Compiling Limit #2 - Too Noob - OnDeath

[00:06:25 01] [insane Limits] Thread(settings): ERROR: 2 errors compiling Expression

[00:06:25 01] [insane Limits] Thread(settings): ERROR: (CS1002, line: 27, column: 108): ; expected

[00:06:25 01] [insane Limits] Thread(settings): ERROR: (CS1525, line: 27, column: 108): Invalid expression term ')'

 

Change I made below, removed ")" after the 20

 

((player.KillsRound + player.DeathsRound) >= 20 && player.KdrRound

That was the correct fix, sorry for the mistake. Good catch.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Thank you for above, yes I wanted in round kdr and battlelog kdr for over 3.0

 

1) Kick KDR over 3.0 always. Also, if more than 32 players in the server, kick noobs equal or less than 45 rank.

 

Number 1

OnKill, set first_check to this Expression:

 

Code:

player.Kdr > 3.0 || player.KdrRound > 3.0 || (server.PlayerCount >= 32 && player.Rank <= 45)
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Hello and merry christmas to everyone,

 

I am planing on using premium maps from now on. I do this with UMM in the evening.

My question is:

Is it possible to programm a limit that allows me to send yell messages on a certain time?

 

For example:

Premium maps start at 7 in the evening. I would like to post three yell messages: @6, 630 and 645.

 

Can I do that?

 

Happy Holidays

 

I tried to adapt from the automatic server restart:

 

OnIntervallServer 300

 

Code:

int Hour24Clock = 18;  // CHANGE: 0 to 23 o'clock, 3 is 3AM, 15 is 3PM
String ChatMessage = "Premium Maps will be active at 19:00"; // CHANGE
String YellMessage = "Premium Maps will be active at 19:00"; // CHANGE
int YellDuration = 10; // CHANGE

// If it's the appointed hour and a restart has not happened in the last 24 hours ...
if (DateTime.Now.Hour == Hour24Clock) 
{
    Thread messenger = new Thread(new ThreadStart(delegate {
        try {
            plugin.PRoConChat("ADMIN > " + ChatMessage);
            plugin.SendGlobalMessage(ChatMessage);
            plugin.SendGlobalYell(YellMessage, YellDuration);
            Thread.Sleep(1800 * 1000);
            plugin.PRoConChat("ADMIN > " + ChatMessage);
            plugin.SendGlobalMessage(ChatMessage);
            plugin.SendGlobalYell(YellMessage, YellDuration);
            Thread.Sleep(900 * 1000);
            plugin.PRoConChat("ADMIN > " + ChatMessage);
            plugin.SendGlobalMessage(ChatMessage);
            plugin.SendGlobalYell(YellMessage, YellDuration);
        } catch (Exception) {}
    }));
    messenger.Name = "RestartMessenger";
    messenger.Start();

}
return false;
would this work?
There are much easier ways to do what you want.

 

BUT, there is a potential problem. The clock used will be the one on the host running Procon. So if you are in Russia and your Procon host is in Germany, the timezones will be different. You will have to adjust the hours for that. Unless your game server is also in Germany, but then again, if your players are in the UK it will still be confusing. So you either should add something about the timezone to the message, or convert to GMT and say so.

 

Create a limit to evaluate OnIntervalServer, set interval to 60, call it "Yell premium change".

 

Set first_check to this Code:

 

Code:

double time1 = 1800; // CHANGE, multiply hours of 24-hour clock by 100 and add minutes, e.g., 6:30 pm is 1830 (6pm on 24 hour clock is 18)
double time2 = 1830; // CHANGE
double time3 = 1845; // CHANGE

String msg1 = "Premium Maps will be active at 19:00"; // CHANGE
String msg2 = "Premium Maps will be active at 19:00"; // CHANGE -- could be different if you want
String msg3 = "Premium Maps will be active at 19:00"; // CHANGE -- could be different if you want
int YellDuration = 15;

int lastMessage = 3;

double currentTime = (DateTime.Now.Hour * 100.0) + DateTime.Now.Minute;

switch (lastMessage) {
    case 3:
        if (currentTime >= time1 && currentTime < time2) {
            plugin.SendGlobalYell(msg1, YellDuration);
            lastMessage = 1;
        }
        break;
    case 1:
        if (currentTime >= time2 && currentTime < time3) {
            plugin.SendGlobalYell(msg2, YellDuration);
            lastMessage = 2;
        }
        break;
    case 2:
        if (currentTime >= time3) {
            plugin.SendGlobalYell(msg3, YellDuration);
            lastMessage = 3;
        }
        break;
    default:
        lastMessage = 3;
        break;
}
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by 397Seth*:

 

There are much easier ways to do what you want.

 

BUT, there is a potential problem. The clock used will be the one on the host running Procon. So if you are in Russia and your Procon host is in Germany, the timezones will be different. You will have to adjust the hours for that. Unless your game server is also in Germany, but then again, if your players are in the UK it will still be confusing. So you either should add something about the timezone to the message, or convert to GMT and say so.

 

Create a limit to evaluate OnIntervalServer, set interval to 60, call it "Yell premium change".

 

Set first_check to this Code:

 

Code:

double time1 = 1800; // CHANGE, multiply hours of 24-hour clock by 100 and add minutes, e.g., 6:30 pm is 1830 (6pm on 24 hour clock is 18)
double time2 = 1830; // CHANGE
double time3 = 1845; // CHANGE

String msg1 = "Premium Maps will be active at 19:00"; // CHANGE
String msg2 = "Premium Maps will be active at 19:00"; // CHANGE -- could be different if you want
String msg3 = "Premium Maps will be active at 19:00"; // CHANGE -- could be different if you want
int YellDuration = 15;

int lastMessage = 3;

double currentTime = (DateTime.Now.Hour * 100.0) + DateTime.Now.Minute;

switch (lastMessage) {
    case 3:
        if (currentTime >= time1 && currentTime < time2) {
            plugin.SendGlobalYell(msg1, YellDuration);
            lastMessage = 1;
        }
        break;
    case 1:
        if (currentTime >= time2 && currentTime < time3) {
            plugin.SendGlobalYell(msg2, YellDuration);
            lastMessage = 2;
        }
        break;
    case 2:
        if (currentTime >= time3) {
            plugin.SendGlobalYell(msg3, YellDuration);
            lastMessage = 3;
        }
        break;
    default:
        lastMessage = 3;
        break;
}
return false;
Thanks you so much for your help!

Procon and gameserver are both in Germany. Will add the timezone information though.

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

Originally Posted by TMiland*:

 

Quick question: Is it possible to get the Preset, like map and mode name in a limit?

 

Like we have:Code:

string mapName = plugin.FriendlyMapName(server.NextMapFileName);
string modeName = plugin.FriendlyModeName(server.NextGamemode);
Could we also have:Code:
string presetName = plugin.FriendlyPresetName(server.NextPresetName);
Just as an example... :tongue:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LumPenPacK*:

 

Quick question: Is it possible to get the Preset, like map and mode name in a limit?

 

Like we have:Code:

string mapName = plugin.FriendlyMapName(server.NextMapFileName);
string modeName = plugin.FriendlyModeName(server.NextGamemode);
Could we also have:Code:
string presetName = plugin.FriendlyPresetName(server.NextPresetName);
Just as an example... :tongue:
I'm pretty sure you can't get that.

 

NextMapFileName and NextGamemode are provided by the server and can be catched via RCON by reading mapList.getMapIndices.

But RCON doesn't provide something similar for NextPrest

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

Originally Posted by TMiland*:

 

I'm pretty sure you can't get that.

 

NextMapFileName and NextGamemode are provided by the server and can be catched via RCON by reading mapList.getMapIndices.

But RCON doesn't provide something similar for NextPrest

Ah crap, okay. :smile:

 

Edit:

I was thinking about dynamic server name, if players voted for inf only, it's would say so in the name of the server. :smile:

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

Originally Posted by LumPenPacK*:

 

Edit:

I was thinking about dynamic server name, if players voted for inf only, it's would say so in the name of the server. :smile:

This should already be possible. Why don't you remember the result of the vote and store it into a Data object. Load the result of the vote with a second limit that evaluate "OnRoundOver". This second limit can change the server name depending on vote result.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

At least it doesn't work with the current version of IL but it might be possible if IL would save any OnPreset commands.

I see. :smile:

 

This should already be possible. Why don't you remember the result of the vote and store it into a Data object. Load the result of the vote with a second limit that evaluate "OnRoundOver". This second limit can change the server name depending on vote result.

I am trying to get this going: showthread....ound)&p=114374*

 

I have no knowledge (yet) how to do as you are describing, i have limited coding skills. :ohmy:

 

Edit:

would this work with the above limits_Code:

if (server.RoundData.issetBool(kVoteResult)) {
	bool succeeded = server.RoundData.getBool(kVoteResult);
	if (succeeded) {
		String ServerName = "[NBFC #1] 24/7 CQ | All Maps | Infantry Only";
		plugin.ServerCommand("vars.serverName", ServerName);
		plugin.ConsoleWrite("^b^1SERVER NAME >^0^n " + ServerName);
		plugin.PRoConChat("^b^1SERVER NAME >^0^n " + ServerName);
	} else {
		String ServerName = "[NBFC #1] 24/7 CQ | All Maps | Normal";
		plugin.ServerCommand("vars.serverName", ServerName);
		plugin.ConsoleWrite("^b^1SERVER NAME >^0^n " + ServerName);
		plugin.PRoConChat("^b^1SERVER NAME >^0^n " + ServerName);
	}
	return false;
}
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Remi*:

 

Here is another request:

 

Do you remember the old days with BF2/2142, where you had custom squad names like "teamplay"?

 

I was wondering if it would be possible, to have a feature like "Type !teamplay to join a squad of teamplayers"?

 

This feature will:

- force the player into one of the last squads on the list (November, Papa etc.), that are rarely used. These squads will be used for those who wants teamplay/orders.

- if the squad is full it will go to the next squad in the list.

 

Often I have players on our server asking "Any teamplayers on_", "Join my squad for teamplay" and etc. Most of the time nothing happens.

 

Thanks for the effort on my previous request about moving people into other squads.

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

Originally Posted by PapaCharlie9*:

 

Here is another request:

 

Do you remember the old days with BF2/2142, where you had custom squad names like "teamplay"?

 

I was wondering if it would be possible, to have a feature like "Type !teamplay to join a squad of teamplayers"?

 

This feature will:

- force the player into one of the last squads on the list (November, Papa etc.), that are rarely used. These squads will be used for those who wants teamplay/orders.

- if the squad is full it will go to the next squad in the list.

 

Often I have players on our server asking "Any teamplayers on_", "Join my squad for teamplay" and etc. Most of the time nothing happens.

 

Thanks for the effort on my previous request about moving people into other squads.

Might as well use Tango, for 'T' as in 'Teamplay'.

 

The "if full use next squad" is kind of hard, so I left that part out.

 

Create a limit to evaluate OnAnyChat, call it "teamplay command".

 

Set first_check to this Code:

 

Code:

if (!Regex.Match(player.LastChat, @"^\s*!teamplay", RegexOptions.IgnoreCase).Success)
    return false;
plugin.SendPlayerMessage(player.Name, "Attempting to move you to squad Tango ...");
plugin.MovePlayer(player.Name, player.TeamId, 20 /* Tango */, true);
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

I see. :smile:

 

 

 

I am trying to get this going: showthread....ound)&p=114374*

 

I have no knowledge (yet) how to do as you are describing, i have limited coding skills. :ohmy:

 

Edit:

would this work with the above limits_Code:

if (server.RoundData.issetBool(kVoteResult)) {
	bool succeeded = server.RoundData.getBool(kVoteResult);
	if (succeeded) {
		String ServerName = "[NBFC #1] 24/7 CQ | All Maps | Infantry Only";
		plugin.ServerCommand("vars.serverName", ServerName);
		plugin.ConsoleWrite("^b^1SERVER NAME >^0^n " + ServerName);
		plugin.PRoConChat("^b^1SERVER NAME >^0^n " + ServerName);
	} else {
		String ServerName = "[NBFC #1] 24/7 CQ | All Maps | Normal";
		plugin.ServerCommand("vars.serverName", ServerName);
		plugin.ConsoleWrite("^b^1SERVER NAME >^0^n " + ServerName);
		plugin.PRoConChat("^b^1SERVER NAME >^0^n " + ServerName);
	}
	return false;
}
It's the right basic idea, but probably the wrong variable. You need a separate variable solely to track the value of the preset that should be stored in Data, not RoundData. RoundData is cleared on end of round, but your preset isn't cleared until you set it to something different.

 

So wherever you are doing the vars.preset command, also do this:

 

Code:

server.Data.setString("RememberPreset", preset); // where 'preset' is the string value of the preset, i.e., "Normal" or "Infantry".
Then in your code above, instead of server.RoundData.getBool(kVoteResult), use:

 

Code:

if (!server.Data.issetString("RememberPreset"))
    return false; // skip if not set yet
String preset =server.Data.getString("RememberPreset");
if (preset == "Normal") {
    ... change server name, etc.
} else if (preset == "Infantry") {
    .... change server name, etc.
}
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

It's the right basic idea, but probably the wrong variable. You need a separate variable solely to track the value of the preset that should be stored in Data, not RoundData. RoundData is cleared on end of round, but your preset isn't cleared until you set it to something different.

 

So wherever you are doing the vars.preset command, also do this:

 

Code:

server.Data.setString("RememberPreset", preset); // where 'preset' is the string value of the preset, i.e., "Normal" or "Infantry".
Then in your code above, instead of server.RoundData.getBool(kVoteResult), use:

 

Code:

if (!server.Data.issetString("RememberPreset"))
    return false; // skip if not set yet
String preset =server.Data.getString("RememberPreset");
if (preset == "Normal") {
    ... change server name, etc.
} else if (preset == "Infantry") {
    .... change server name, etc.
}
Okay, THANK YOU once again! :smile:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Hello I am just wondering if it is possible to LIMIT the number of aircraft on a server with this plugin?

You cannot limit the number, but limit the use of aircrafts (correct me if i'm wrong).

 

You can use this as a template: showthread....ohibit-Gunship*

 

I have changed it for you:

Code:

/* Version 9.16/R4 */
/* SETUP */

// Message templates
// {0} will be replaced with PlayerName
// {1} will be replaced by prohibited weapon/vehicle name, see below
String autoKilled = "{0} AUTO-KILLED for using the PROHIBITED {1}";
String autoKicked = "{0} AUTO-KICKED for using the PROHIBITED {1}";
String tempBan = "{0} TEMP BAN 1 HOUR for using the PROHIBITED {1}";
String yellKilled = "The {1} is prohibited. You will be AUTO-KICKED if you use it again.";

// Times
int yellTime = 25; // seconds
int banTime = 60; // minutes
double multiKillTime = 5; // seconds

// Weapon/vehicle codes

bool isAircraft = Regex.Match(kill.Weapon, @"(CH_FJET_J-20|F35B|RU_FJET_T-50_Pak_FA|CH_JET_Q5_FANTAN|A10_THUNDERBOLT)").Success;

/* CODE */

if (!isAircraft) return false;

String prohibited = "Aircraft";

String key = "PersistAircraft_" + prohibited + "_" + killer.Name;

int count = 0;
if (plugin.Data.issetInt(key)) count = plugin.Data.getInt(key);

DateTime last = DateTime.MinValue;
if (server.Data.issetObject(key)) last = (DateTime)server.Data.getObject(key);
if (DateTime.Now.Subtract(last).TotalSeconds <= multiKillTime) return false;
server.Data.setObject(key, (Object)DateTime.Now);

count = count + 1;

String msg = null;

if (count == 1) { // First Violation: Kill

    msg = String.Format(autoKilled, killer.Name, prohibited);
    plugin.SendGlobalMessage(msg);
    plugin.SendPlayerYell(killer.Name, String.Format(yellKilled, killer.Name, prohibited), yellTime);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.KillPlayer(killer.Name, 6);

} else if (count == 2) { // Second Violation: Kick

    msg = String.Format(autoKicked, killer.Name, prohibited);
    plugin.SendGlobalMessage(msg);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.KickPlayerWithMessage(killer.Name, msg);

} else { // Third or subsequent Violation: TBan

    msg = String.Format(tempBan, killer.Name, prohibited);
    plugin.SendGlobalMessage(msg);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, banTime, msg);

}

plugin.Data.setInt(key, count);
return false;
On this line: Code:
bool isAircraft = Regex.Match(kill.Weapon, @"(CH_FJET_J-20|F35B|RU_FJET_T-50_Pak_FA|CH_JET_Q5_FANTAN|A10_THUNDERBOLT)").Success;
is where you want to add or remove what aircrafts you want to limit. :smile:

 

Here's the Air vehicles codes:

Code:

// Air vehicles
procon.protected.weapons.add None "Gameplay/Vehicles/A-10_THUNDERBOLT/A10_THUNDERBOLT" Primary VehicleAir
procon.protected.weapons.add None "Gameplay/Vehicles/AC130/AC130_Gunship" Primary VehicleAir
procon.protected.weapons.add None "Gameplay/Vehicles/AH1Z/AH1Z" Primary VehicleAir
procon.protected.weapons.add None "Gameplay/Vehicles/AH6/AH6_Littlebird" Primary VehicleAir
procon.protected.weapons.add None "XP1/Gameplay/Vehicles/B1Lancer/B1Lancer" Primary VehicleAir
procon.protected.weapons.add None "Gameplay/Vehicles/F35/F35B" Primary VehicleAir
procon.protected.weapons.add None "Gameplay/Vehicles/Ch_FJET_J-20/CH_FJET_J-20" Primary VehicleAir
procon.protected.weapons.add None "XP1/Gameplay/Vehicles/H6K/H6K" Primary VehicleAir
procon.protected.weapons.add None "Gameplay/Vehicles/Mi28/Mi28" Primary VehicleAir
procon.protected.weapons.add None "Gameplay/Vehicles/SU-25TM/SU-25TM" Primary VehicleAir
procon.protected.weapons.add None "Gameplay/Vehicles/RU_FJET_T-50_Pak_FA/RU_FJET_T-50_Pak_FA" Primary VehicleAir
procon.protected.weapons.add None "Gameplay/Vehicles/UAV_GlobalHawk/UAV_GlobalHawk" Primary VehicleAir
procon.protected.weapons.add None "Gameplay/Vehicles/CH_JET_Qiang-5-fantan/CH_JET_Q5_FANTAN" Primary VehicleAir
procon.protected.weapons.add None "Z-10w" Primary VehicleAir
procon.protected.weapons.add None "Gameplay/Vehicles/Z11W/Z-11w" Primary VehicleAir
procon.protected.weapons.add None "Gameplay/Vehicles/Z11W/spec/Z-11w_CH" Primary VehicleAir
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by DoMMike*:

 

Make a separate limit OnDeath and use this expression in first_check:

 

Code:

((player.KillsRound + player.DeathsRound) >= 20) && player.KdrRound <= 0.10)
Then set the Action to temp ban as you like.
How can I add this line here? (server.PlayerCount >= 32)

 

I don't want it to kick people until the server has 32 players.

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

Originally Posted by LCARSx64*:

 

How can I add this line here? (server.PlayerCount >= 32)

 

I don't want it to kick people until the server has 32 players.

Change the first_check Expression to:

Code:

(server.PlayerCount >= 32 && (player.KillsRound + player.DeathsRound) >= 20 && player.KdrRound <= 0.10)
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by superg*:

 

I want to enable obliteration competitive during obliteration rounds and disable during other game modes. Will this work ok using OnRoundOver?

 

Code:

if (server.NextGamemode == "Obliteration")
    plugin.ServerCommand("vars.isCompetitive true");
else
    plugin.ServerCommand("vars.isCompetitive false");
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by w262035635*:

 

HI,PapaCharlie9

I am looking for a plug-in

 

 

When a team ticket gap is too much

Will automatically be the end of the round

For example,

Team A Tickets: 1200

Team B tickets: 200

Gap is 900 + tickets

To determine the Team A victory

 

 

This need how to do?

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

Originally Posted by ColColonCleaner*:

 

HI,PapaCharlie9

I am looking for a plug-in

 

 

When a team ticket gap is too much

Will automatically be the end of the round

For example,

Team A Tickets: 1200

Team B tickets: 200

Gap is 900 + tickets

To determine the Team A victory

 

 

This need how to do?

Weren't you running AdKats? If so, there is a built in feature for auto-surrender.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

HI,PapaCharlie9

I am looking for a plug-in

 

 

When a team ticket gap is too much

Will automatically be the end of the round

For example,

Team A Tickets: 1200

Team B tickets: 200

Gap is 900 + tickets

To determine the Team A victory

 

 

This need how to do?

Try this: showthread....-%28CQ-only%29*
* 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.