Jump to content

Insane Limits Requests


ImportBot

Recommended Posts

Originally Posted by PapaCharlie9*:

 

hi, i have limit for bad words but want to add "jew" to it. fix code for me please? thanks!!

I would have done the same thing as LCARS. I didn't notice that the first pattern was a combination of words.

 

If you just want one word alone, you add another line:

 

Code:

List<String> bad_words = new List<String>();
    
bad_words.Add(@"n+[1i]+g+[3ea]+r*(bitch|lover|ass|etc)_");
[b]bad_words.Add(@"jew");[/b]
    
String[] chat_words = Regex.Split(player.LastChat, @"\s+");
    
    foreach(String chat_word in chat_words)
        foreach(String bad_word in bad_words)
            if (Regex.Match(chat_word, "^"+bad_word+"$", RegexOptions.IgnoreCase).Success)
                return true;
            
    return false;
* Restored post. It could be that the author is no longer active.
Link to comment
  • Replies 3.2k
  • Created
  • Last Reply

Originally Posted by LCARSx64*:

 

i thought the bitch lover ass etc was in lines with when they use it w the N word. I don't want people getting kicked from my server by saying "lover" :biggrin:

Oh sorry, you're absolutely right, here's the correct way (this will match jew as well as j3w:

Code:

List<String> bad_words = new List<String>();
    
bad_words.Add(@"n+[1i]+g+[3ea]+r*(bitch|lover|ass|etc)_");
bad_words.Add(@"j+[3e]+w");

String[] chat_words = Regex.Split(player.LastChat, @"\s+");
    
    foreach(String chat_word in chat_words)
        foreach(String bad_word in bad_words)
            if (Regex.Match(chat_word, "^"+bad_word+"$", RegexOptions.IgnoreCase).Success)
                return true;

    return false;
If you also want to cover jew bitch, jew lover, jew ass, etc, change the 2nd bad_words.Add line to:

Code:

bad_words.Add(@"j+[3e]+w*(bitch|lover|ass|etc)_");
EDIT: I only saw Papa's post after I replied, however I'll leave the contents as it covers a little more. :ohmy:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Phractal*:

 

Hi all,

 

I am trying to get this limit to work and hoping for some helpful input.

What I am trying to achieve is that once the round ends, the timer in HArdline is set to 300 and whern the Round starts, back to 100 and preeset NORMAL. The RoundEnd part works fine, but the Round Start part doesnt. :sad: I only tried it on an emoty erver though, does that have anythign to do with it? Just manually restarted the round via Procon or switched to next map.

 

Anyway, here are the codes:

 

First Limit

 

OnRoundOver first check set to Code

Code:

plugin.ServerCommand("vars.roundTimeLimit", "300");
return false;
Second Limit:

OnRoundStart first check set to Code

Code:

plugin.ServerCommand("vars.roundTimeLimit", "100");
plugin.ServerCommand("vars.preset", "NORMAL", "false");
return false;
Thanks for any help!
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Hi all,

 

I am trying to get this limit to work and hoping for some helpful input.

What I am trying to achieve is that once the round ends, the timer in HArdline is set to 300 and whern the Round starts, back to 100 and preeset NORMAL. The RoundEnd part works fine, but the Round Start part doesnt. :sad: I only tried it on an emoty erver though, does that have anythign to do with it? Just manually restarted the round via Procon or switched to next map.

 

Anyway, here are the codes:

 

First Limit

 

OnRoundOver first check set to Code

Code:

plugin.ServerCommand("vars.roundTimeLimit", "300");
return false;
Second Limit:

OnRoundStart first check set to Code

Code:

plugin.ServerCommand("vars.roundTimeLimit", "100");
plugin.ServerCommand("vars.preset", "NORMAL", "false");
return false;
Thanks for any help!
It's because OnRoundStart is triggered when the first player spawns. That's too late for what you want to do.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Phractal*:

 

It's because OnRoundStart is triggered when the first player spawns. That's too late for what you want to do.

You actually gave me the hint I needed, thanks PC9 :smile:

 

I now got it successfully to work as intended. On round end it sets the time limit to 200% so the next round starts with double the time. As soon as the round starts the limit gets reverted back to 100% thus turning the server back to Normal preset (which seems more appealing to people).

 

Heres what I used:

OnRoundOver

first check to this expression

Code:

(server.PlayerCount > 3)
second check to this code

Code:

plugin.ServerCommand("vars.roundTimeLimit", "300");
plugin.ServerCommand("vars.roundStartReadyPlayersPercent", "0");
plugin.ServerCommand("vars.roundWarmupTimeout", "30");
return false;
OnRoundStart

first check to this expression

Code:

(server.PlayerCount > 3)
second check to this code

Code:

plugin.ServerCommand("vars.roundTimeLimit", "100");
plugin.ServerCommand("vars.roundStartReadyPlayersPercent", "35");
plugin.ServerCommand("vars.roundWarmupTimeout", "45");
plugin.ServerCommand("vars.preset", "NORMAL", "false");
return false;
Limit activates only if more than 3 people are on the server, keeping my servers at Normal most of the time without having to loose out on customisation.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

Any chance to script headshot streak/ headshot counter for BF4?

Please provide specific details like, e.g. ... When do you want these streaks to display? Who should see them? Give examples of what to actually display, etc.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by moacco07*:

 

Please provide specific details like, e.g. ... When do you want these streaks to display? Who should see them? Give examples of what to actually display, etc.

Hi LCARSx64,

 

My sincere apologies for not providing you with more details. Below is the structure.

 

- Say message to all applies, starting at 3 kills, subsequent 5, 7, 10 and stops at 20 and when player got killed, message reset

- Message (player has X headshot kill streaks) X= number of kills. 3,5,7,10 and 20.

- Message when player got killed (player has ended player's headshot kill streaks at X) X = number of headshot player has achieved before getting killed bu other player.

 

- Also are you able to come up with script that shows headshot distance.

- anything above 800 meters, it will show in "Say to all" Player has headshot killed player at distance of XXXX meters.

- and if anyone achieved longer distance then the previous player.

Message (say to all) New record player has headshot killed player at distance of XXXX meters.

- And at the end of the Round, can it be shown as "Say to all" Record for headshot distance stands at XXXX meters.

 

Hope my message does not confuse you.

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

Originally Posted by LCARSx64*:

 

Hi LCARSx64,

 

My sincere apologies for not providing you with more details. Below is the structure.

 

- Say message to all applies, starting at 3 kills, subsequent 5, 7, 10 and stops at 20 and when player got killed, message reset

- Message (player has X headshot kill streaks) X= number of kills. 3,5,7,10 and 20.

- Message when player got killed (player has ended player's headshot kill streaks at X) X = number of headshot player has achieved before getting killed bu other player.

 

- Also are you able to come up with script that shows headshot distance.

- anything above 800 meters, it will show in "Say to all" Player has headshot killed player at distance of XXXX meters.

- and if anyone achieved longer distance then the previous player.

Message (say to all) New record player has headshot killed player at distance of XXXX meters.

- And at the end of the Round, can it be shown as "Say to all" Record for headshot distance stands at XXXX meters.

 

Hope my message does not confuse you.

As far as I'm aware there is no way of determining the headshot distance, so unfortunately this isn't possible.

 

The headshot kill streak is possible and requires 2 limits...

 


Headshot Streak 1 of 2

 

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

 

Set first_check to this Code:

 

NOTE: Remove the code highlighted in red if you wish the headshot streak to increase even if there is a non-headshot kill between kills, e.g.

  • 1st kill by headshot
  • 2nd kill by body shot
  • 3rd kill by headshot
  • Total headshot streak = 2

Code:

// Headshot Streak - Limit 1 of 2
// v1.0 - OnKill
//

String hsKey = "_HS_STREAK_";
String msg = player.Name + " has a headshot kill streak of ";
int hsCount = 0;

if (kill.Headshot)
{
    if (player.RoundData.issetInt(hsKey)) hsCount = player.RoundData.getInt(hsKey);
    hsCount++;
    if (hsCount == 3 || hsCount == 5 || hsCount == 7 || hsCount == 10 || hsCount == 20)
    {
        msg = msg + hsCount.ToString() + "!";
        plugin.SendGlobalMessage(msg);
    }
}
else
{
    hsCount = 0;
}
player.RoundData.setInt(hsKey, hsCount);

return false;

Headshot Streak 2 of 2

 

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

 

Set first_check to this Code:

Code:

// Headshot Streak - Limit 2 of 2
// v1.0 - OnDeath
//

String hsKey = "_HS_STREAK_";
String msg = killer.Name + " has ended " + player.Name + "'s headshot streak at ";
int hsCount = 0;

if (player.RoundData.issetInt(hsKey)) hsCount = player.RoundData.getInt(hsKey);
if (hsCount > 0)
{
    msg = msg + hsCount.ToString() + "!";
    plugin.SendGlobalMessage(msg);
}
player.RoundData.setInt(hsKey, 0);

return false;

End of post.

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

Originally Posted by moacco07*:

 

As far as I'm aware there is no way of determining the headshot distance, so unfortunately this isn't possible.

 

The headshot kill streak is possible and requires 2 limits...

 


Headshot Streak 1 of 2

 

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

 

Set first_check to this Code:

 

NOTE: Remove the code highlighted in red if you wish the headshot streak to increase even if there is a non-headshot kill between kills, e.g.

  • 1st kill by headshot
  • 2nd kill by body shot
  • 3rd kill by headshot
  • Total headshot streak = 2

Code:

// Headshot Streak - Limit 1 of 2
// v1.0 - OnKill
//

String hsKey = "_HS_STREAK_";
String msg = player.Name + " has a headshot kill streak of ";
int hsCount = 0;

if (kill.Headshot)
{
    if (player.RoundData.issetInt(hsKey)) hsCount = player.RoundData.getInt(hsKey);
    hsCount++;
    if (hsCount == 3 || hsCount == 5 || hsCount == 7 || hsCount == 10 || hsCount == 20)
    {
        msg = msg + hsCount.ToString() + "!";
        plugin.SendGlobalMessage(msg);
    }
}
else
{
    hsCount = 0;
}
player.RoundData.setInt(hsKey, hsCount);

return false;

Headshot Streak 2 of 2

 

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

 

Set first_check to this Code:

Code:

// Headshot Streak - Limit 2 of 2
// v1.0 - OnDeath
//

String hsKey = "_HS_STREAK_";
String msg = killer.Name + " has ended " + player.Name + "'s headshot streak at ";
int hsCount = 0;

if (player.RoundData.issetInt(hsKey)) hsCount = player.RoundData.getInt(hsKey);
if (hsCount > 0)
{
    msg = msg + hsCount.ToString() + "!";
    plugin.SendGlobalMessage(msg);
}
player.RoundData.setInt(hsKey, 0);

return false;

End of post.

Thank you. I enter this scripts now.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

Thank you. I enter this scripts now.

I just noticed that I hadn't red highlighted a small part of the optional removal code in my previous post, I've edited that post to include the missing highlight.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

The headshot kill streak is possible and requires 2 limits...

Nothing wrong with those limits -- they fit the requirements perfectly, but for the sake of education, I'll point out that you could do both functions in one limit. Just check the victim in OnKill.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

Nothing wrong with those limits -- they fit the requirements perfectly, but for the sake of education, I'll point out that you could do both functions in one limit. Just check the victim in OnKill.

Good point, I never even considered checking the victim. Thanks. :smile:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by moacco07*:

 

Hi again,

 

can anyone direct me or create scripts for Sniper rifles, DMR and knife only with following punishment for using other weapons.

 

1 - kill

2 - kill

3 - kick

4 - tban 30 mins, then counter reset.

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

Originally Posted by LCARSx64*:

 

Hi again,

 

can anyone direct me or create scripts for Sniper rifles, DMR and knife only with following punishment for using other weapons.

 

1 - kill

2 - kill

3 - kick

4 - tban 30 mins, then counter reset.

Here you go:

 


Weapon Limiter (Sniper, DMR && Knife ONLY)

 

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

 

Set first_check to this Code:

Code:

// Weapon Limiter (Sniper, DMR & Knife ONLY) - Limit 1 of 1
// v1.0 - OnKill
//

String sdkKey = player.Name + "_SDK_LIMITER_";
int iCount = 0;
String msg = "Only Sniper Rifles, DMRs and Knifes are allowed!";
String[] logs = { "^b^1Weapon Limiter^0^n: ",
                  "Weapon Limiter: ",
                  " has been killed for using a prohibited weapon. Warning ", 
                  " has been kicked for using a prohibited weapon. Warning ",
                  " has been 30 minute banned for using a prohibited weapon. Warning " };

if (!Regex.Match(kill.Category, @"(SniperRifle|DMR|Melee)").Success || player.Role != 0) return false;
if (server.Data.issetInt(sdkKey)) iCount = server.Data.getInt(sdkKey);
iCount++;
switch (iCount)
{
    case 1:
    case 2:
        plugin.SendPlayerMessage(player.Name, msg);
        plugin.SendPlayerYell(player.Name, "\n" + msg, 8);
        plugin.KillPlayer(player.Name);
        plugin.ConsoleWrite(logs[0] + player.Name + logs[2] + iCount.ToString() + ".");
        plugin.PRoConChat(logs[0] + player.Name + logs[2] + iCount.ToString() + ".");
        plugin.PRoConEvent(logs[1] + player.Name + logs[2] + iCount.ToString() + ".", "Insane Limits");
        break;
    case 3:
        plugin.ConsoleWrite(logs[0] + player.Name + logs[3] + iCount.ToString() + ".");
        plugin.PRoConChat(logs[0] + player.Name + logs[3] + iCount.ToString() + ".");
        plugin.PRoConEvent(logs[1] + player.Name + logs[3] + iCount.ToString() + ".", "Insane Limits");
        plugin.KickPlayerWithMessage(player.Name, msg);
        break;
    case 4:
        plugin.ConsoleWrite(logs[0] + player.Name + logs[4] + iCount.ToString() + ".");
        plugin.PRoConChat(logs[0] + player.Name + logs[4] + iCount.ToString() + ".");
        plugin.PRoConEvent(logs[1] + player.Name + logs[4] + iCount.ToString() + ".", "Insane Limits");
        plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, player.Name, 30, msg);
        iCount = 0;
        break;
}
server.Data.setInt(sdkKey, iCount);

return false;

End of post!

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

Originally Posted by moacco07*:

 

Here you go:

 


Weapon Limiter (Sniper, DMR && Knife ONLY)

 

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

 

Set first_check to this Code:

Code:

// Weapon Limiter (Sniper, DMR & Knife ONLY) - Limit 1 of 1
// v1.0 - OnKill
//

String sdkKey = player.Name + "_SDK_LIMITER_";
int iCount = 0;
String msg = "Only Sniper Rifles, DMRs and Knifes are allowed!";
String[] logs = { "^b^1Weapon Limiter^0^n: ",
                  "Weapon Limiter: ",
                  " has been killed for using a prohibited weapon. Warning ", 
                  " has been kicked for using a prohibited weapon. Warning ",
                  " has been 30 minute banned for using a prohibited weapon. Warning " };

if (!Regex.Match(kill.Category, @"(SniperRifle|DMR|Melee)").Success || player.Role != 0) return false;
if (server.Data.issetInt(sdkKey)) iCount = server.Data.getInt(sdkKey);
iCount++;
switch (iCount)
{
    case 1:
    case 2:
        plugin.SendPlayerMessage(player.Name, msg);
        plugin.SendPlayerYell(player.Name, "\n" + msg, 8);
        plugin.KillPlayer(player.Name);
        plugin.ConsoleWrite(logs[0] + player.Name + logs[2] + iCount.ToString() + ".");
        plugin.PRoConChat(logs[0] + player.Name + logs[2] + iCount.ToString() + ".");
        plugin.PRoConEvent(logs[1] + player.Name + logs[2] + iCount.ToString() + ".", "Insane Limits");
        break;
    case 3:
        plugin.ConsoleWrite(logs[0] + player.Name + logs[3] + iCount.ToString() + ".");
        plugin.PRoConChat(logs[0] + player.Name + logs[3] + iCount.ToString() + ".");
        plugin.PRoConEvent(logs[1] + player.Name + logs[3] + iCount.ToString() + ".", "Insane Limits");
        plugin.KickPlayerWithMessage(player.Name, msg);
        break;
    case 4:
        plugin.ConsoleWrite(logs[0] + player.Name + logs[4] + iCount.ToString() + ".");
        plugin.PRoConChat(logs[0] + player.Name + logs[4] + iCount.ToString() + ".");
        plugin.PRoConEvent(logs[1] + player.Name + logs[4] + iCount.ToString() + ".", "Insane Limits");
        plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, player.Name, 30, msg);
        iCount = 0;
        break;
}
server.Data.setInt(sdkKey, iCount);

return false;

End of post!

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

Originally Posted by buzZzer*:

 

Hey Guys,

 

can anyone help me A Sniper limit (for BFHL) of this as implemented by Procon rules to Insame Limits? THX

 

#Set values for Max # of snipers, Teamsize is smallest team in server

#---------------------------------------------------------------

On Spawn;ServerFirst;

Set %server_TeamSize2_sniperlimit% 1

Set %server_TeamSize4_sniperlimit% 1

Set %server_TeamSize8_sniperlimit% 2

Set %server_TeamSize12_sniperlimit% 3

Set %server_TeamSize16_sniperlimit% 4

Set %server_TeamSize20_sniperlimit% 5

Set %server_TeamSize24_sniperlinit% 6

Set %server_TeamSize32_sniperlimit% 8

#----------------------------------------------------------------

 

On Spawn;

if %n% >= -1;if %n% %server_TeamSize2_sniperlimit%;Set %server_sniperlimit% %server_TeamSize2_sniperlimit%;ALL SniperLimit set to %server_sniperlimit% per team!!! (XXS teams)

if %n% >= 3;if %n% %server_TeamSize4_sniperlimit%;Set %server_sniperlimit% %server_TeamSize4_sniperlimit%;ALL SniperLimit set to %server_sniperlimit% per team!!! (XS small teams)

if %n% >= 5;if %n% %server_TeamSize8_sniperlimit%;Set %server_sniperlimit% %server_TeamSize8_sniperlimit%;ALL SniperLimit set to %server_sniperlimit% per team!!! (S teams)

if %n% >= 9;if %n% %server_TeamSize12_sniperlimit%;Set %server_sniperlimit% %server_TeamSize12_sniperlimit%;ALL SniperLimit set to %server_sniperlimit% per team!!! (M teams)

if %n% >= 13;if %n% %server_TeamSize16_sniperlimit%;Set %server_sniperlimit% %server_TeamSize16_sniperlimit%;ALL SniperLimit set to %server_sniperlimit% per team!!! (L teams)

if %n% >= 15;if %n% %server_TeamSize20_sniperlimit%;Set %server_sniperlimit% %server_TeamSize20_sniperlimit%;ALL SniperLimit set to %server_sniperlimit% per team!!! (XL teams)

if %n% >= 19;if %n% %server_TeamSize24_sniperlimit%;Set %server_sniperlimit% %server_TeamSize24_sniperlimit%;ALL SniperLimit set to %server_sniperlimit% per team!!! (XXL teams)

if %n% >= 25;if %n% %server_TeamSize32_sniperlimit%;Set %server_sniperlimit% %server_TeamSize32_sniperlimit%;ALL SniperLimit set to %server_sniperlimit% per team!!! (XXXL teams)

 

# SNIPER LIMIT rulz by TARRELTJE

On Spawn;if %_beingsniper% == 1;Decr %_beingsniper%;Decr %team_recontotal%;log we have %team_recontotal% snipers on team %pt%

On Spawn;Set %_beingsniper% 0

 

On kill;Damage sniperRifle;

if %team_recontotal% == %server_sniperlimit%;if %_beingsniper% == 0;Say Sniper Limit max %server_sniperlimit% snipers each team !!!;Kill

if %_beingsniper% == 1;End;log %p% is still a sniper, %team_recontotal% snipers on team %pt%

incr %team_recontotal%;set %_beingsniper% 1;log %p% is a sniper, %team_recontotal% snipers on team %pt%

On kill;Not Damage sniperRifle;Not Damage Handgun;if %_beingsniper% == 1;decr %_beingsniper%;decr %team_recontotal%;log %p% is no sniper anymore, %team_recontotal% snipers on team %pt%

On Leave;if %_beingsniper% == 1;Decr %team_recontotal%

 

# !snipers / !sniperx INFO MESSAGES

On Say;Text !snipers;

PlayerSay Sniper limit: %server_sl_total[%ptk%]%/%server_sniperlimit%. Reserve slot with sniper kill, lose it with non-sniper/handgun kill.

If %server_sl_total[%ptk%]% == 0;PlayerSay 0/%server_sniperlimit% SNIPERS on team %pt%

If %server_sl_total[%ptk%]% > 0;PlayerSay %pt% SNIPER[1/%server_sniperlimit%] is %server_sl_snipername[%ptk%][1]%

If %server_sl_total[%ptk%]% > 1;PlayerSay %pt% SNIPER[2/%server_sniperlimit%] is %server_sl_snipername[%ptk%][2]%

If %server_sl_total[%ptk%]% > 2;PlayerSay %pt% SNIPER[3/%server_sniperlimit%] is %server_sl_snipername[%ptk%][3]%

If %server_sl_total[%ptk%]% > 3;PlayerSay %pt% SNIPER[4/%server_sniperlimit%] is %server_sl_snipername[%ptk%][4]%

 

On Say;Text !sniperx;

PlayerSay SNIPERS: Team 1: %server_sl_total[1]%/%server_sniperlimit%, Team 2: %server_sl_total[2]%/%server_sniperlimit%

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

Originally Posted by PapaCharlie9*:

 

Hey Guys,

 

can anyone help me A Sniper limit (for BFHL) of this as implemented by Procon rules to Insame Limits? THX

Why not just use ProconRulz?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by buzZzer*:

 

Why not just use ProconRulz?

work both plugins without interfering ?

I previously thought that only one of them works but not both together ..?

 

p.s sorry for my bad english

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

Originally Posted by LCARSx64*:

 

work both plugins without interfering ?

I previously thought that only one of them works but not both together ..?

 

p.s sorry for my bad english

You can use both plugins together, just make sure you don't have a ProconRulz Rule and Insane Limits Limit doing the same thing(s). :ohmy:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by s1ngular1ty*:

 

How can you create a message in Insane Limits to all admins that are in game like the AdminSay command in ProConRulz ?

 

I can't seem to figure this out. Any help is appreciated!

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

Originally Posted by LCARSx64*:

 

How can you create a message in Insane Limits to all admins that are in game like the AdminSay command in ProConRulz ?

 

I can't seem to figure this out. Any help is appreciated!

There are a couple of ways of doing this, you could test if a player has a Procon account with specific privileges or you could use a custom list of all your admins. Each method would also have to be altered depending on the type of triggering event, for example, if the event is OnAnyChat then you would just check the specific player that triggered this event. If the event was something like OnIntervalServer, you might grab a list of all players in the server and then test each player in that list for admin privileges.

 

Examples:


Using a custom list:

 

Set use_custom_lists to True and create a new list with these parameters:

Code:

name = admins
comparison = CaseSensitive
data = player1, player2, etc.
Test if a player is in the list:

Code:

if (plugin.isInList(player.Name, "admins"))
{
    // Player is admin, add your code here
}

Testing for Procon privileges (in this example the player must be able to kill, kick, ban, move and change maps):

Code:

bool bKill = false;
bool bKick = false;
bool bBan = false;
bool bMove = false;
bool bLevel = false;

if (plugin.CheckAccount(player.Name, out bKill, out bKick, out bBan, out bMove, out bLevel))
{
    if (bKill && bKick && bBan && bMove && bLevel)
    {
        // Player is admin, add your code here.
    }
}
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by moacco07*:

 

Hello again,

 

I have another request. Now my preset for idle kick is at 86400 secs= 24 hrs and the reason is for populating the server. But when the server is populated we still people in the server still idling. Is there any script for insane limit that can something like below.

 

- When server have 0 - 39 players idle timer is at 86400 seconds

- When server hits more than 40 it activates new idle timer at 300 seconds

- When the server is empty again it reset the counter

- This sequence will repeat

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

Originally Posted by s1ngular1ty*:

 

There are a couple of ways of doing this, you could test if a player has a Procon account with specific privileges or you could use a custom list of all your admins. Each method would also have to be altered depending on the type of triggering event, for example, if the event is OnAnyChat then you would just check the specific player that triggered this event. If the event was something like OnIntervalServer, you might grab a list of all players in the server and then test each player in that list for admin privileges.

 

Examples:


Using a custom list:

 

Set use_custom_lists to True and create a new list with these parameters:

Code:

name = admins
comparison = CaseSensitive
data = player1, player2, etc.
Test if a player is in the list:

Code:

if (plugin.isInList(player.Name, "admins"))
{
    // Player is admin, add your code here
}

Testing for Procon privileges (in this example the player must be able to kill, kick, ban, move and change maps):

Code:

bool bKill = false;
bool bKick = false;
bool bBan = false;
bool bMove = false;
bool bLevel = false;

if (plugin.CheckAccount(player.Name, out bKill, out bKick, out bBan, out bMove, out bLevel))
{
    if (bKill && bKick && bBan && bMove && bLevel)
    {
        // Player is admin, add your code here.
    }
}
Thanks for the reply!!!

 

So, say I want to use the 2nd option. How would I send the message to all Admins in game? Do I need to loop through the player list somehow?

 

Can you provide an example?

 

Also I had a second unrelated question. How can you store variables permanently that are never automatically erased or reset? You can do this in ProCon Rulz and I'd like to be able to do something similar in Insane Limits.

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

Originally Posted by LCARSx64*:

 

Thanks for the reply!!!

 

So, say I want to use the 2nd option. How would I send the message to all Admins in game? Do I need to loop through the player list somehow?

 

Can you provide an example?

 

Also I had a second unrelated question. How can you store variables permanently that are never automatically erased or reset? You can do this in ProCon Rulz and I'd like to be able to do something similar in Insane Limits.

Depending on the triggering event then yes, you would make a list of all players and cycle through those selecting only the admins. If the triggering event were something like OnAnyChat then you could simply just check the player that triggered it.

Here is an example of creating a list of all players and cycling through it:

Code:

List<PlayerInfoInterface> allPlayers = new List<PlayerInfoInterface>();
allPlayers.AddRange(team1.players);
allPlayers.AddRange(team2.players);
String msg = "This is a message only to Admins!";
bool bKill = false;
bool bKick = false;
bool bBan = false;
bool bMove = false;
bool bLevel = false;

foreach (PlayerInfoInterface p in allPlayers)
{
    bKill = false;
    bKick = false;
    bBan = false;
    bMove = false;
    bLevel = false;
    if (plugin.CheckAccount(p.Name, out bKill, out bKick, out bBan, out bMove, out bLevel))
    {
        if (bKill && bKick && bBan)
        {
            plugin.SendPlayerMessage(p.Name, msg);
        }
    }
}

return false;
The code above will create a list of all players in the server then test each for Procon admin privileges, if the player is an admin he/she is sent a chat message.

 

As for storing variables permanently, this would depend on what you actually mean by permanently. If you meant store while the plugin is active, you would use something like:

Code:

String myKey = "Variable_Key"; // This is a string to use as the variable key
String myString = "A string variable"; // This is the actual variable data

plugin.Data.setString(myKey, myString);
For more details, see Data and RoundData Objects, in the first post of the Insane Limits thread: showthread....17-NOV-2013%29*

 

If by permanently you mean to store even after a Procon layer is shutdown, you can use text files. For an example of this, take a look at the code in the following limit: myrcon.net/.../insane-limits-vip-slot-manager-vip-slot-for-help-server-start-v10

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

Originally Posted by moacco07*:

 

Hello again,

 

I have another request. Now my preset for idle kick is at 86400 secs= 24 hrs and the reason is for populating the server. But when the server is populated we still people in the server still idling. Is there any script for insane limit that can something like below.

 

- When server have 0 - 39 players idle timer is at 86400 seconds

- When server hits more than 40 it activates new idle timer at 300 seconds

- When the server is empty again it reset the counter

- This sequence will repeat

Hello,

 

I don't mean spam but just to remind if anyone can create this script?

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

Originally Posted by LCARSx64*:

 

Hello again,

 

I have another request. Now my preset for idle kick is at 86400 secs= 24 hrs and the reason is for populating the server. But when the server is populated we still people in the server still idling. Is there any script for insane limit that can something like below.

 

- When server have 0 - 39 players idle timer is at 86400 seconds

- When server hits more than 40 it activates new idle timer at 300 seconds

- When the server is empty again it reset the counter

- This sequence will repeat

I am unsure if the idle timeout can be changed on the fly, but if it can, the following limit will work (albeit not the most efficient way):

 

NOTE: Change the value highlighted in red to your desired timing (minimum 10 seconds).


Adaptive Idle Timeout

 

Create a new limit to evaluate OnIntervalServer. Set the evaluation_interval to 30 seconds. Set action to None.

 

Set first_check to this Code:

Code:

// Adaptive Idle Timeout - Limit 1 of 1
// v1.0 - OnIntervalServer - first_check
//

int idleTimeout = 86400;

if (server.PlayerCount >= 40) idleTimeout = 300;
plugin.ServerCommand("vars.idleTimeout", idleTimeout.ToString());

return false;

End of post.

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

Originally Posted by moacco07*:

 

I am unsure if the idle timeout can be changed on the fly, but if it can, the following limit will work (albeit not the most efficient way):

 

NOTE: Change the value highlighted in red to your desired timing (minimum 10 seconds).


Adaptive Idle Timeout

 

Create a new limit to evaluate OnIntervalServer. Set the evaluation_interval to 30 seconds. Set action to None.

 

Set first_check to this Code:

Code:

// Adaptive Idle Timeout - Limit 1 of 1
// v1.0 - OnIntervalServer - first_check
//

int idleTimeout = 86400;

if (server.PlayerCount >= 40) idleTimeout = 300;
plugin.ServerCommand("vars.idleTimeout", idleTimeout.ToString());

return false;

End of post.

Hi LCARSx64,

 

Thank you Sir for the code. I'll try and report back regardless if it's working or not.

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

Originally Posted by s1ngular1ty*:

 

Depending on the triggering event then yes, you would make a list of all players and cycle through those selecting only the admins. If the triggering event were something like OnAnyChat then you could simply just check the player that triggered it.

Here is an example of creating a list of all players and cycling through it:

Code:

List<PlayerInfoInterface> allPlayers = new List<PlayerInfoInterface>();
allPlayers.AddRange(team1.players);
allPlayers.AddRange(team2.players);
String msg = "This is a message only to Admins!";
bool bKill = false;
bool bKick = false;
bool bBan = false;
bool bMove = false;
bool bLevel = false;

foreach (PlayerInfoInterface p in allPlayers)
{
    bKill = false;
    bKick = false;
    bBan = false;
    bMove = false;
    bLevel = false;
    if (plugin.CheckAccount(p.Name, out bKill, out bKick, out bBan, out bMove, out bLevel))
    {
        if (bKill && bKick && bBan)
        {
            plugin.SendPlayerMessage(p.Name, msg);
        }
    }
}

return false;
The code above will create a list of all players in the server then test each for Procon admin privileges, if the player is an admin he/she is sent a chat message.

 

As for storing variables permanently, this would depend on what you actually mean by permanently. If you meant store while the plugin is active, you would use something like:

Code:

String myKey = "Variable_Key"; // This is a string to use as the variable key
String myString = "A string variable"; // This is the actual variable data

plugin.Data.setString(myKey, myString);
For more details, see Data and RoundData Objects, in the first post of the Insane Limits thread: showthread....17-NOV-2013%29*

 

If by permanently you mean to store even after a Procon layer is shutdown, you can use text files. For an example of this, take a look at the code in the following limit: myrcon.net/.../insane-limits-vip-slot-manager-vip-slot-for-help-server-start-v10

Thanks!!! That helps a lot.
* 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.