Jump to content

Insane Limits - Examples


Recommended Posts

Originally Posted by droopie*:

 

Ahh.. so just need to add all the vars for HC in the top part and vars for SC after the else command.. cool ty.

yes, if LESS THEN 16, like in my post, settings go on the top, else if more then 16 goes on the bottom.

 

but i think i set the wrong link so here it is. its just 1 post above the linked post...

myrcon.net/...insane-limits-examples#entry18680

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

Originally Posted by QUACK-Major-Pain*:

 

Think I got it.

 

Onjoin

 

code

 

Code:

// When less than 16 players - Quick Match
if (server.PlayerCount < 16 ) {
    plugin.ServerCommand("vars.friendlyFire", "false");
    plugin.ServerCommand("vars.killCam", "true");
    plugin.ServerCommand("vars.nameTag", "true");
    plugin.ServerCommand("vars.regenerateHealth", "true");
    plugin.ServerCommand("vars.hud", "true");
    plugin.ServerCommand("vars.onlySquadLeaderSpawn", "false");
    plugin.ServerCommand("vars.3dSpotting", "true");
    plugin.ServerCommand("vars.3pCam", "true");
    plugin.ServerCommand("vars.idleTimeout", "0");
// When 16+ players - Hard Core
} else {
    plugin.ServerCommand("vars.friendlyFire", "true");
    plugin.ServerCommand("vars.killCam", "false");
    plugin.ServerCommand("vars.nameTag", "false");
    plugin.ServerCommand("vars.regenerateHealth", "false");
    plugin.ServerCommand("vars.hud", "false");
    plugin.ServerCommand("vars.onlySquadLeaderSpawn", "true");
    plugin.ServerCommand("vars.3dSpotting", "false");
    plugin.ServerCommand("vars.3pCam", "false");
    plugin.ServerCommand("vars.idleTimeout", "1800");
}
Question: should true and false be in quotes?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by micovery*:

 

Think I got it.

 

Question: should true and false be in quotes?

Quotes is fine, I think. Basically what this does ... it sends exactly the sequence of strings exactly as you specified them.

 

As if you had typed them in the ProCon console without the quotes.

 

Code:

plugin.ServerCommand("vars.killCam", "true");  ===>    vars.killCam true
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by droopie*:

 

Quotes is fine, I think. Basically what this does ... it sends exactly the sequence of strings exactly as you specified them.

 

As if you had typed them in the ProCon console without the quotes.

 

Code:

plugin.ServerCommand("vars.killCam", "true");  ===>    vars.killCam true
from what i understand quotes should only be used if its not single word. like description or server name that has spaces.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by micovery*:

 

from what i understand quotes should only be used if its not single word. like description or server name that has spaces.

The quotes you see there never actually end up in the command. They are just for creating a String variable in C#. Each string is sent as a "word" to ProCon.

 

Suppose you had.

Code:

plugin.ServerCommand("vars.ServerName", "Some Server Name");
It should still work ... because ProCon sees just two strings/words.

 

 

When I talk about "words" I am not referring to literal words ... I am referring to words as defined by the BF3 Protocol specification.

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

Originally Posted by micovery*:

 

This limit will send custom welcome messages to specific players. You can customize the message audience and text depending on the player.

 

Set limit to evaluate OnSpawn, set action to None

 

Set first_check to this Expression

 

Code:

true
Set second_check to this Code

 

Code:

double count = limit.ActivationsTotal(player.Name);
    
    /* Make sure it only runs the first time player spawns */
    if (count > 1)
        return false;
    
    /* Setup the messages Structure */
    Dictionary<String, Object[] > messages = new Dictionary<String, Object[] >();
    
    messages.Add("player1", new Object[] {MessageAudience.All, "Everyone lets welcome player.FullName!"});
    messages.Add("[b]micovery[/b]", new Object[] {[b]MessageAudience.Squad[/b], [b]"Welcome player.FullName, good to see you back!"[/b]});
    messages.Add("player3", new Object[] {MessageAudience.All, "Everyone lets welcome player.Name from player.Tag clan!"});
    

    /* Check if there is a message defined for the player */
    if (!messages.ContainsKey(player.Name))
        return false;
        
    /* Get the message data for the player */
    Object [] data = messages[player.Name];
    
    /* Sanity check the message data */
    if (data == null || data.Length < 2 || 
        data[0] == null || !typeof(MessageAudience).Equals(data[0].GetType()) ||
        data[1] == null || !typeof(String).Equals(data[1].GetType()))
        return false;
        
    MessageAudience audience = (MessageAudience) data[0];
    String message = (String) data[1];
    
    /* Peform replacements on the message */
    message = plugin.R(message);

    /* Finally Send the message */
    if (audience.Equals(MessageAudience.All))
        plugin.SendGlobalMessage(message);
    else if (audience.Equals(MessageAudience.Team))
        plugin.SendTeamMessage(player.TeamId, message);
    else if (audience.Equals(MessageAudience.Squad))
        plugin.SendSquadMessage(player.TeamId, player.SquadId, message);
    
    return false;
Note that this example is not intended to send messages to any player that joins the server. The purpose of this example is to send specific message to only certain players.

 

You have to specify the player name, and the message for that player. I added one for myself in bold-red.

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

Originally Posted by WaxMyCarrot*:

 

Think I got it.

 

Onjoin

 

code

 

Code:

// When less than 16 players - Quick Match
if (server.PlayerCount < 16 ) {
    plugin.ServerCommand("vars.friendlyFire", "false");
    plugin.ServerCommand("vars.killCam", "true");
    plugin.ServerCommand("vars.nameTag", "true");
    plugin.ServerCommand("vars.regenerateHealth", "true");
    plugin.ServerCommand("vars.hud", "true");
    plugin.ServerCommand("vars.onlySquadLeaderSpawn", "false");
    plugin.ServerCommand("vars.3dSpotting", "true");
    plugin.ServerCommand("vars.3pCam", "true");
    plugin.ServerCommand("vars.idleTimeout", "0");
// When 16+ players - Hard Core
} else {
    plugin.ServerCommand("vars.friendlyFire", "true");
    plugin.ServerCommand("vars.killCam", "false");
    plugin.ServerCommand("vars.nameTag", "false");
    plugin.ServerCommand("vars.regenerateHealth", "false");
    plugin.ServerCommand("vars.hud", "false");
    plugin.ServerCommand("vars.onlySquadLeaderSpawn", "true");
    plugin.ServerCommand("vars.3dSpotting", "false");
    plugin.ServerCommand("vars.3pCam", "false");
    plugin.ServerCommand("vars.idleTimeout", "1800");
}
Question: should true and false be in quotes?
Can we add an admin.say string here to say something like "Server switching to Hardcore!"?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by WaxMyCarrot*:

 

This limit allows players to use In-Game command "!votekick ". Players can vote as many times they want, and against as many players they want. The are no time or concurrency restrictions. However, votes are only counted once (you can only vote once against a certain player). If any player accumulates votes from more than 50% of all players in the server, that player is kicked. All votes are reset at the end of a round. The player name does not have to be a full-name. It can be a sub-string or misspelled name.

 

Set limit to evaluate OnAnyChat, set action to None

 

Set first_check to this Code

Code:

double percent = 50;

/* Verify that it is a command */
if (!plugin.IsInGameCommand(player.LastChat))
    return false;

/* Extract the command */
String command = plugin.ExtractInGameCommand(player.LastChat);

/* Sanity check the command */
if (command.Length == 0)
    return false;
    
/* Parse the command */
Match kickMatch = Regex.Match(command, @"^votekick\s+([^ ]+)", RegexOptions.IgnoreCase);

/* Bail out if not a vote-kick */
if (!kickMatch.Success)
    return false;
    
/* Extract the player name */
PlayerInfoInterface target = plugin.GetPlayer(kickMatch.Groups[1].Value.Trim());

if (target == null)
    return false;
    
if (target.Name.Equals(player.Name))
{
    plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("player.Name, you cannot vote-kick yourself!"));
    return false;
}
    
/* Account the vote in the voter's dictionary */
/* Votes are kept with the voter, not the votee */
/* If the voter leaves, his votes are not counted */

if (!player.DataRound.issetObject("votekick"))
    player.DataRound.setObject("votekick", new Dictionary<String, bool>());

Dictionary<String, bool> vdict =  (Dictionary<String, bool>) player.DataRound.getObject("votekick");

if (!vdict.ContainsKey(target.Name))
    vdict.Add(target.Name, true);


/* Tally the votes against the target player */
double votes = 0;
List<PlayerInfoInterface> all = new List<PlayerInfoInterface>();
all.AddRange(team1.players);
all.AddRange(team2.players);
all.AddRange(team3.players);
all.AddRange(team4.players);

foreach(PlayerInfoInterface p in all)
    if (p.DataRound.issetObject("votekick"))
    {
       Dictionary<String, bool> pvotes = (Dictionary<String, bool>) p.DataRound.getObject("votekick");
       if (pvotes.ContainsKey(target.Name) && pvotes[target.Name])
           votes++;
    }

if (all.Count == 0)
    return false;
    
int needed = (int) Math.Ceiling((double) all.Count * (percent/100.0));
int remain = (int) ( needed - votes);

if (remain == 1)
   plugin.SendGlobalMessage(target.Name + " is about to get vote-kicked, 1 more vote needed");
else if (remain > 0)
   plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("player.Name, your vote against " + target.Name + " was counted, " + remain + " more needed to kick"));

if (remain > 0)
    plugin.ConsoleWrite(player.Name + ", is trying to vote-kick " + target.Name + ", " + remain + " more votes needed");

if (votes >= needed)
{
    String count = "with " + votes + " vote" + ((votes > 1)_"s":"");
    String message = target.Name + " was vote-kicked " + count ;
    plugin.SendGlobalMessage(message);
    plugin.ConsoleWrite(message);
    plugin.KickPlayerWithMessage(target.Name, target.Name + ", you were vote-kicked from the server " + count);
    return true;
}

return false;
Could this be adapted to do a @votescramble?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by micovery*:

 

Can we add an admin.say string here to say something like "Server switching to Hardcore!"?

This limit will keep switching server between hard-core, and soft-core mode, depending on the number of players in the server. When the mode is switched, the limit sends a global message notifying players of the change.

 

Set limit to evaluate OnInterval, set action to None

 

Set first_check to this Code:

 

Code:

double switch_value = 16;

bool_ hardcore = null;
if (server.Data.issetBool("hardcore"))
    hardcore = server.Data.getBool("hardcore");
        
if (server.PlayerCount < switch_value &&  ( hardcore == true || hardcore == null) ) 
{
    plugin.SendGlobalMessage("Switching server to soft-core mode");
    plugin.ConsoleWrite("Switching server to soft-core mode");
    server.Data.setBool("hardcore", false);
    
    plugin.ServerCommand("vars.friendlyFire", "false");
    plugin.ServerCommand("vars.killCam", "true");
    plugin.ServerCommand("vars.nameTag", "true");
    plugin.ServerCommand("vars.regenerateHealth", "true");
    plugin.ServerCommand("vars.hud", "true");
    plugin.ServerCommand("vars.onlySquadLeaderSpawn", "false");
    plugin.ServerCommand("vars.3dSpotting", "true");
    plugin.ServerCommand("vars.3pCam", "true");
    plugin.ServerCommand("vars.idleTimeout", "0");
    plugin.ServerCommand("vars.soldierHealth", "100");
        
}
else if ( server.PlayerCount > switch_value && (hardcore == false || hardcore == null))
{
    plugin.SendGlobalMessage("Switching server to hard-core mode");
    plugin.ConsoleWrite("Switching server to hard-core mode");
    
    server.Data.setBool("hardcore", true);

    plugin.ServerCommand("vars.friendlyFire", "true");
    plugin.ServerCommand("vars.killCam", "false");
    plugin.ServerCommand("vars.nameTag", "false");
    plugin.ServerCommand("vars.regenerateHealth", "false");
    plugin.ServerCommand("vars.hud", "false");
    plugin.ServerCommand("vars.onlySquadLeaderSpawn", "true");
    plugin.ServerCommand("vars.3dSpotting", "false");
    plugin.ServerCommand("vars.3pCam", "false");
    plugin.ServerCommand("vars.idleTimeout", "1800");
    plugin.ServerCommand("vars.soldierHealth", "60"); 
}
Note that this limit stores a flag "hardcore" in the server object. Depending on the value of the flag, it decides whether or not mode needs to be switched again. This is needed so that it would not keep spamming the switch message, as well well as not sending server commands unnecessarily if the mode is already the same.

 

This flag is only cleared if the plugin is enabled/disabled. The limit is not in any way aware of what the current mode is. It assumes that whatever mode it set last time ... is the one currently active. Because of this, if you manually change the mode, the limit will not know of the mode change.

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

Originally Posted by QUACK-Major-Pain*:

 

This limit will keep switching server between hard-core, and soft-core mode, depending on the number of players in the server. When the mode is switched, the limit sends a global message notifying players of the change.

 

Set limit to evaluate OnInterval, set action to None

 

Set first_check to this Code:

 

Code:

double switch_value = 16;

bool_ hardcore = null;
if (server.Data.issetBool("hardcore"))
    hardcore = server.Data.getBool("hardcore");
        
if (server.PlayerCount < switch_value &&  ( hardcore == true || hardcore == null) ) 
{
    plugin.SendGlobalMessage("Switching server to soft-core mode");
    plugin.ConsoleWrite("Switching server to soft-core mode");
    server.Data.setBool("hardcore", false);
    
    plugin.ServerCommand("vars.friendlyFire", "false");
    plugin.ServerCommand("vars.killCam", "true");
    plugin.ServerCommand("vars.nameTag", "true");
    plugin.ServerCommand("vars.regenerateHealth", "true");
    plugin.ServerCommand("vars.hud", "true");
    plugin.ServerCommand("vars.onlySquadLeaderSpawn", "false");
    plugin.ServerCommand("vars.3dSpotting", "true");
    plugin.ServerCommand("vars.3pCam", "true");
    plugin.ServerCommand("vars.idleTimeout", "0");
        
}
else if ( server.PlayerCount > switch_value && (hardcore == false || hardcore == null))
{
    plugin.SendGlobalMessage("Switching server to hard-core mode");
    plugin.ConsoleWrite("Switching server to hard-core mode");
    
    server.Data.setBool("hardcore", true);

    plugin.ServerCommand("vars.friendlyFire", "true");
    plugin.ServerCommand("vars.killCam", "false");
    plugin.ServerCommand("vars.nameTag", "false");
    plugin.ServerCommand("vars.regenerateHealth", "false");
    plugin.ServerCommand("vars.hud", "false");
    plugin.ServerCommand("vars.onlySquadLeaderSpawn", "true");
    plugin.ServerCommand("vars.3dSpotting", "false");
    plugin.ServerCommand("vars.3pCam", "false");
    plugin.ServerCommand("vars.idleTimeout", "1800");
    
}
Note that this limit stores a flag "hardcore" in the server object. Depending on the value of the flag, it decides whether or not mode needs to be switched again. This is needed so that it would not keep spamming the switch message, as well well as not sending server commands unnecessarily if the mode is already the same.

 

This flag is only cleared if the plugin is enabled/disabled. The limit is not in any way aware of what the current mode is. It assumes that whatever mode it set last time ... is the one currently active. Because of this, if you manually change the mode, the limit will not know of the mode change.

Missing 2 settings:

 

soft core: plugin.ServerCommand("vars.soldierHealth" "100");

hard core: plugin.ServerCommand("vars.soldierHealth" "60");

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

Originally Posted by Fynn13*:

 

This limit will send custom welcome messages to specific players. You can customize the message audience and text depending on the player.

 

Set limit to evaluate OnSpawn, set action to None

 

Set first_check to this Expression

 

Code:

true
Set second_check to this Code

 

Code:

double count = limit.ActivationsTotal(player.Name);
    
    /* Make sure it only runs the first time player spawns */
    if (count > 1)
        return false;
    
    /* Setup the messages Structure */
    Dictionary<String, Object[] > messages = new Dictionary<String, Object[] >();
    
    messages.Add("player1", new Object[] {MessageAudience.All, "Everyone lets welcome player.FullName!"});
    messages.Add("micovery", new Object[] {[b]MessageAudience.Squad[/b], [b]"Welcome player.FullName, good to see you back!"[/b]});
    messages.Add("player3", new Object[] {MessageAudience.All, "Everyone lets welcome player.Name from player.Tag clan!"});
    

    /* Check if there is a message defined for the player */
    if (!messages.ContainsKey(player.Name))
        return false;
        
    /* Get the message data for the player */
    Object [] data = messages[player.Name];
    
    /* Sanity check the message data */
    if (data == null || data.Length < 2 || 
        data[0] == null || !typeof(MessageAudience).Equals(data[0].GetType()) ||
        data[1] == null || !typeof(String).Equals(data[1].GetType()))
        return false;
        
    MessageAudience audience = (MessageAudience) data[0];
    String message = (String) data[1];
    
    /* Peform replacements on the message */
    message = plugin.R(message);

    /* Finally Send the message */
    if (audience.Equals(MessageAudience.All))
        plugin.SendGlobalMessage(message);
    else if (audience.Equals(MessageAudience.Team))
        plugin.SendTeamMessage(player.TeamId, message);
    else if (audience.Equals(MessageAudience.Squad))
        plugin.SendSquadMessage(player.TeamId, player.SquadId, message);
    
    return false;
this is not working, can anyone fix this ? but the other codes/limits are working thanks. please help me with this
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Mootart*:

 

This limit will activate for players who get more than 90% headshots after 30 kills (with a specific weapon). This works across rounds. (Total stats are not reset at the end of the round).

 

Set limit to evaluate OnKill, set action to Kick,

 

Set first_check to this Code:

 

Code:

double kills = player[kill.Weapon].KillsTotal;
         double headshots = player[kill.Weapon].HeadshotsTotal;
         double headshots_percent = Math.Round((headshots / kills)*100.0, 2);
         
         if (headshots_percent > 90 && kills > 30)
         {
             plugin.ConsoleWrite(plugin.R("%p_n% has " + headshots_percent + " headshots percent with "+ kill.Weapon + " after " + kills + " kills"));
             return true;
         }
         
         return false;
Set these action specific parameters:

Code:

kick_message = %p_n%, you were kicked for suspicious headshots percentage with %w_n%
This feature (per-weapon stats) is not extensively tested. You should adjust the conditions to test, and see if it works as you expect it. If you are going to test it on a populated server, make sure it's on virtual so you can adjust the values until you feel comfortable that it will not kick everyone.
after every round layer procon is disconnecting and lost connection. i tried to disable work great without issue. but when i use this limit layer procon is always shutting down after every round.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

this is not working, can anyone fix this ? but the other codes/limits are working thanks. please help me with this

we got same problem! :biggrin:

I'd love to help, but guys, we're not mind readers. You have to give some detail about what exactly is not working.

 

I was able to compile the code just fine with no errors, so I guess it's not a compilation error. Did you change the names in the messages.Add() function lines?

 

Question for micovery: What the heck is MessageAudience? And, so that's how to build an anonymous list, with Object[] o = {value1, value2, value3 ...};! I was wondering. Fortunately, everything I have needed was covered by KeyValuePair, so I just used that.

 

BTW, I couldn't get:

 

Func Descend = delegate(double a, double B) { ... };

 

to compile. It said Func wasn't in any namespace. Not supported?

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

Originally Posted by micovery*:

 

this is not working, can anyone fix this ? but the other codes/limits are working thanks. please help me with this

You need to give more details about why is not working ... do you get any errors? Set debug level to 4, and see if anything useful is printed on the plugin log... Also, don't quote the example, instead paste the code you are using in your limit. The example is just a template.

 

I'd love to help, but guys, we're not mind readers. You have to give some detail about what exactly is not working.

 

I was able to compile the code just fine with no errors, so I guess it's not a compilation error. Did you change the names in the messages.Add() function lines?

 

Question for micovery: What the heck is MessageAudience? And, so that's how to build an anonymous list, with Object[] o = {value1, value2, value3 ...};! I was wondering. Fortunately, everything I have needed was covered by KeyValuePair, so I just used that.

 

BTW, I couldn't get:

 

Func Descend = delegate(double a, double B) { ... };

 

to compile. It said Func wasn't in any namespace. Not supported?

I needed to store multiple values in the Dictionary Value, so I figured I could use an Object array. Totally forgot about KeyValuePair!

 

This is used internally to keep track of the Say messages when they are put in the queue for throttling.

Code:

public enum MessageAudience { All    = 0x01,
                                  Team   = 0x02,
                                  Squad  = 0x04,
                                  Player = 0x08 };
You can actually use any of the global enums defined in the plugin (at the beginning).

Code:

// bitwise safe enums
    public enum EABanDuration { Temporary = 0x01,
                                Permanent = 0x02,
                                Round     = 0x04 };

    public enum PBBanDuration { Temporary = 0x01, 
                                Permanent = 0x02};

    public enum MessageAudience { All    = 0x01,
                                  Team   = 0x02,
                                  Squad  = 0x04,
                                  Player = 0x08 };
    
    public enum EABanType { EA_GUID    = 0x01,
                            IPAddress  = 0x02, 
                            Name       = 0x04};

    public enum PBBanType { PB_GUID = 0x01};
    
    public enum StatSource { Web    = 0x01,
                             Round  = 0x02,
                             Total  = 0x04
                           };
    
    public enum BaseEvent { 
                             None       = 0x000,
                             Kill       = 0x001, 
                             Suicide    = 0x002, 
                             TeamKill   = 0x004, 
                             Spawn      = 0x008,
                             GlobalChat = 0x010,
                             TeamChat   = 0x020,
                             SquadChat  = 0x040,
                             RoundOver  = 0x080,
                             RoundStart = 0x100,
                             TeamChange = 0x200};
   


    public enum Actions
    {
        None           = 0x000,
        Kick           = 0x001,
        Kill           = 0x002,
        PBBan          = 0x004,
        EABan          = 0x010,
        Say            = 0x020,
        Log            = 0x040,
        TaskbarNotify  = 0x080,
        Mail           = 0x100,
        SMS            = 0x200,
    }

    public enum TrueFalse { False  = 0x01, 
                            True = 0x02};

    public enum ShowHide
    {
        Show = 0x01,
        Hide = 0x02
    }
Func is not going to work ... I think that's a .NET 3.5 construct. Phogue added a check in the anonymous stats collections to see what version of .NET people are using ... that way the ProCon devs can gauge what the impact would be of making .NET 3.5 a requirement for future versions.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Switch Hardcore/Softcore Mode Based on Player Count*

Shouldn't this limit have some hysteresis? If you happen to bounce between 15 and 16 players for a while, everyone that's playing is going to get whiplash.

 

Maybe a little state machine:

 

double switch_value = 16;

double reset_value = 13;

int state = 0;

 

State 0: Softcore, transition to State 1 if PlayerCount >= switch_value

 

State 1: Hardcore, transition to State 0 if PlayerCount

 

Also, I think there's a typo, "bool_" should be "bool".

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

Originally Posted by micovery*:

 

Shouldn't this limit have some hysteresis? If you happen to bounce between 15 and 16 players for a while, everyone that's playing is going to get whiplash.

 

Maybe a little state machine:

 

double switch_value = 16;

double reset_value = 13;

int state = 0;

 

State 0: Softcore, transition to State 1 if PlayerCount >= switch_value

 

State 1: Hardcore, transition to State 0 if PlayerCount

 

Also, I think there's a typo, "bool_" should be "bool".

I see what you mean ... going around the switch value will spam the message. Let's see if people complain about this, I'll change it to your approach.

 

"bool_" is on purpose. Having the question sign after the type tells C# that NULL is allowed for that type.

 

http://msdn.microsoft.com/en-us/library/1t3y8s4s.aspx

 

Not often needed, but in this case, it was ok, since I needed a to represent 3 states ... true/false/unset.

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

Originally Posted by Fynn13*:

 

sorry for some bad of my mistakes, this is my first time *sorry*.

 

what is debug level for ? for many limits I made ?

 

What I did is just I follow the instruction and edit the true to ( true )

 

here's what i got I don't know if this is an error but please help

 

[05:54:50 50] [insane Limits] Thread(enforcer): no valid limits founds, skipping this iteration

[05:54:50 50] [insane Limits] Thread(enforcer): sleeping for 20 seconds, before next iteration

 

please check:

http://farm8.staticflickr.com/7145/6...d8472df2_b.jpg

 

http://farm8.staticflickr.com/7002/6...ccd2410b_b.jpg

 

Attached Files:

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

Originally Posted by micovery*:

 

what is debug level for ? for many limits I made ?

Debug level is not documented in the first post, but this is what it does:

 

The higher the debug_level, the more debug messages are printed to the console.

 

More details about the different levels are in this change log

 

http://www.phogue.net/forumvb/showth...ll=1#post33983*

 

 

here's what i got I don't know if this is an error but please help

 

[05:54:50 50] [insane Limits] Thread(enforcer): no valid limits founds, skipping this iteration

[05:54:50 50] [insane Limits] Thread(enforcer): sleeping for 20 seconds, before next iteration

It's not an error... The enforcer thread is only responsible for evaluating OnJoin, and OnInterval limits ... so if you don't have any of those ... it just tells you that it has nothing to do, and goes back to sleep.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by micovery*:

 

I'd love to help, but guys, we're not mind readers. You have to give some detail about what exactly is not working.

I think I know what's going on ... The explanation in the example is not totally clear. I think, they are using the example as-is, without modifying the messages list (bold-red).

 

This example is not intended to send individual-messages to all players. It's only intended to send specific/different messages to certain players.

 

See this section from the example

 

Code:

messages.Add("player1", new Object[] {MessageAudience.All, "Everyone lets welcome player.FullName!"});
    messages.Add("[b]micovery[/b]", new Object[] {[b]MessageAudience.All[/b], [b]"Here comes player.FullName to break something!"[/b]});
    messages.Add("player3", new Object[] {MessageAudience.All, "Everyone lets welcome player.Name from player.Tag clan!"});
You have to specify the player name, and the message for that player. I added one for myself in bold-red.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by QUACK-Major-Pain*:

 

The soft core/hard core limit isn't working.

It does change from soft core to hard core, but doesn't fall back to soft core as people leave.

 

Server is currently empty and still showing as hard core.

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

Originally Posted by phrogz*:

 

This limit will wait until there are less than 15 % tickets remaining in either team. It will announce two times the type of the next gamemode. It's pretty basic (I'm not a dev guy)!

 

Set limit to evaluate OnSpawn, set action to None.

 

Set first_check to this Expression:

 

Code:

(team1.RemainTicketsPercent < 15 || team2.RemainTicketsPercent < 15)
Set second_check to this Code:

 

Code:

    if (limit.Activations() > 2)
        return false;

if (server.PlayerCount < 16 ) {
		String message = "If no more than 15 players come";
		String message1 = "Next Mode will be SQDM!";
                plugin.SendGlobalMessage(message); 
		plugin.SendGlobalMessage(message1);
		plugin.ConsoleWrite(message);
		plugin.ConsoleWrite(message1);
// When 15- players - SQDM
}

if ((server.PlayerCount > 15) && (server.PlayerCount < 18)  ) {
		String message = "If more than 15 players stay";
		String message1 = "Next Mode will be TDM!";
                plugin.SendGlobalMessage(message); 
		plugin.SendGlobalMessage(message1);
		plugin.ConsoleWrite(message);
		plugin.ConsoleWrite(message1);
// When 16+ players - TDM
}


if (server.PlayerCount > 18 ) {
		String message = "If more than 18 players stay";
		String message1 = "Next Mode will be CQ / Rush!";
                plugin.SendGlobalMessage(message); 
		plugin.SendGlobalMessage(message1);
		plugin.ConsoleWrite(message);
		plugin.ConsoleWrite(message1);
// When 19+ players - CQ
}
return false;
In this case:

SQDM: 0 - 15

TDM: 16 - 18

CQ / Rush: >18

 

Actually I've no problem when the current mod is SQDM...don't ask why

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




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