Jump to content

Insane Limits: BF4 Gunmaster Random Presets


ImportBot

Recommended Posts

Originally Posted by DER_M4DE*:

 

I have to wait until my server is updated in order for me to test, but having said that, I may skip updating this and just go with my advanced version (with the ability to vote for presets) depending on demand.

ok :smile:

 

which is your advanced version?

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

Originally Posted by steep100*:

 

Good day. And me again with my problem,the last script is not working on my server with mixed modes and voting that it is necessary to change the script to add a preset from night maps?

 

Code:

// BF4 Gunmaster Random Presets & Early Skip Post Round - Limit 1 of 1
// v1.0 - OnRoundOver - first_check
//

Thread gmrnd = new Thread(
    new ThreadStart(
        delegate
        {
            try
            {
                int iDelay = 40; // Delay in seconds
                Thread.Sleep(iDelay * 1000);
                if (server.NextGamemode == "GunMaster0")
                {
                    int lastPreset = 0;
                    bool allowTroll = false;
                    bool showChat = true;
                    bool showYell = true;
                    bool showProcon = true;
                    int nextPreset = 0;
                    int maxPreset = 5;
                    Random rnd = new Random();
                    String lastKey = "_LASTGM_";
                    String[] presets = { "Standard",
                                         "Classic",
                                         "Pistol",
                                         "DLC",
                                         "Troll" };
                    String msg = "Next GunMaster preset will be: ";
                    if (!allowTroll) maxPreset = 4;
                    if (server.Data.issetInt(lastKey)) lastPreset = server.Data.getInt(lastKey);
                    nextPreset = rnd.Next(maxPreset);
                    while (nextPreset == lastPreset)
                    {
                        nextPreset = rnd.Next(maxPreset);
                    }
                    plugin.ServerCommand("vars.gunMasterWeaponsPreset", nextPreset.ToString());
                    if (showChat) plugin.SendGlobalMessage(msg + presets[nextPreset]);
                    if (showYell) plugin.SendGlobalYell("\n" + msg + presets[nextPreset], 8);
                    if (showProcon) plugin.PRoConChat(msg + "^b^1" + presets[nextPreset] + "^0^n.");
                    server.Data.setInt(lastKey, nextPreset);
                }
            }
            catch (Exception e)
            {
                plugin.ConsoleException(e.ToString());
            }
        }
    )
);

gmrnd.Name = "GMPresetRandomizer";
gmrnd.Start();

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

Originally Posted by LCARSx64*:

 

Good day. And me again with my problem,the last script is not working on my server with mixed modes and voting that it is necessary to change the script to add a preset from night maps?

See the first post in this thread, the limit has been updated for the summer patch.

 

Also, when you post code, please enclose it in code tags:

[CODE]Place code here[/code]

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

Originally Posted by Deity*:

 

I know for me, I can't get the server to recognize preset 5 at all. I've got the var set to 5 but no matter what, even when only running the two night ops maps, no night weapons.

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

Originally Posted by oldschool*:

 

I just downloaded and installed the plugin. I'm having difficulty in entering the code for the limit. I've watched the video but Im just not understanding how to input the code. I don't see where to enter this code in to enable random presets. All there is is one line with limit_1_first_check_code. Do I copy and paste the code there? Or do I save a text file and upload it to plugins folder and input text file name there? Attachment 4063

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

Originally Posted by LCARSx64*:

 

I know for me, I can't get the server to recognize preset 5 at all. I've got the var set to 5 but no matter what, even when only running the two night ops maps, no night weapons.

That is strange. There's only a couple of things I can think of that may cause that:

 

  • Something else is changing your preset (another plugin or limit etc.).
  • Is your server Offical? I'd assume the preset would work with Official servers but maybe there's a bug that prevents it.

I just downloaded and installed the plugin. I'm having difficulty in entering the code for the limit. I've watched the video but Im just not understanding how to input the code. I don't see where to enter this code in to enable random presets. All there is is one line with limit_1_first_check_code. Do I copy and paste the code there? Or do I save a text file and upload it to plugins folder and input text file name there? Attachment 4063

In Procon's Parent Layer Control tab, select the Plugins sub tab. On the left side, highlight the Insane Limits plugin. On the right side follow these steps:

 

  • In the section titled 1. Settings set vitual_mode to False.
  • Set use_direct_fetch to True.
  • Scroll down to the section titled 3. Limit Manager there is a drop down menu to the far left of new_limit, in this select True. This will create a new section farther down entitled Limit #1 - Name1 (Enabled, NotCompiled) (the number will be different if you already have other limits installed).
  • In the newly created section, you will see limit_1_hide, in the drop down to the far right, select Show. This will now expand the Limit #1 - Name1 (Enabled, NotCompiled) section to display more options.
  • The settings in here relate to the limit in post #1. First change limit_1_name to BF4 Gunmaster Random Presets.
  • In the far right drop down under limit_1_evaluation, select OnRoundOver.
  • In the far right drop down under limit_1_first_check, select Code. A new option entitled limit_1_first_check_code will appear immediately below this option.
  • In the far right drop down under limit_1_first_check_code, paste the whole code from post #1 and click the drop down arrow again to close it.
  • The title of this limit should now change from Limit #1 - Name1 (Enabled, NotCompiled) to BF4 Gunmaster Random Presets (Enabled, Compiled).
  • That's it, the limit is now installed and active.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by steep100*:

 

I need more info to go on. What exactly isn't working? What happens when a round ends? Is your server Official or Ranked/Hardcore etc.?

The server hardcore,ranked,at the end of rounds in chat the next preset prescribed,but does not change in the next round

Here is the script I use now

Code:

// BF4 Gunmaster Random Presets & Early Skip Post Round - Limit 1 of 1
// v1.0 - OnRoundOver - first_check
//

Thread gmrnd = new Thread(
    new ThreadStart(
        delegate
        {
            try
            {
                int iDelay = 40; // Delay in seconds
                Thread.Sleep(iDelay * 1000);
                if (server.NextGamemode == "GunMaster0")
                {
                    int lastPreset = 0;
                    bool allowTroll = false;
                    bool showChat = true;
                    bool showYell = true;
                    bool showProcon = true;
                    int nextPreset = 0;
                    int maxPreset = 5;
                    Random rnd = new Random();
                    String lastKey = "_LASTGM_";
                    String[] presets = { "Standard",
                                         "Classic",
                                         "Pistol",
                                         "DLC",
                                         "Troll" };
                    String msg = "Next GunMaster preset will be: ";
                    if (!allowTroll) maxPreset = 4;
                    if (server.Data.issetInt(lastKey)) lastPreset = server.Data.getInt(lastKey);
                    nextPreset = rnd.Next(maxPreset);
                    while (nextPreset == lastPreset)
                    {
                        nextPreset = rnd.Next(maxPreset);
                    }
                    plugin.ServerCommand("vars.gunMasterWeaponsPreset", nextPreset.ToString());
                    if (showChat) plugin.SendGlobalMessage(msg + presets[nextPreset]);
                    if (showYell) plugin.SendGlobalYell("\n" + msg + presets[nextPreset], 8);
                    if (showProcon) plugin.PRoConChat(msg + "^b^1" + presets[nextPreset] + "^0^n.");
                    server.Data.setInt(lastKey, nextPreset);
                }
            }
            catch (Exception e)
            {
                plugin.ConsoleException(e.ToString());
            }
        }
    )
);

gmrnd.Name = "GMPresetRandomizer";
gmrnd.Start();

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

Originally Posted by LCARSx64*:

 

The server hardcore,ranked,at the end of rounds in chat the next preset prescribed,but does not change in the next round

That is older code, post #1 of this thread has the latest version and supports Zavod: Graveyard Shift and Night weapons preset.

Are the rounds ending normally or being forced to end?

Is your end of round wait time 45 seconds or are you skipping this wait? (The wait where you can see the round's final scoreboard).

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

Originally Posted by DER_M4DE*:

 

Here is the script I use now

Code:

// BF4 Gunmaster Random Presets & Early Skip Post Round - Limit 1 of 1
// v1.0 - OnRoundOver - first_check
//

Thread gmrnd = new Thread(
    new ThreadStart(
        delegate
        {
            try
            {
                int iDelay = 40; // Delay in seconds
                Thread.Sleep(iDelay * 1000);
                if (server.NextGamemode == "GunMaster0")
                {
                    int lastPreset = 0;
                    bool allowTroll = false;
                    bool showChat = true;
                    bool showYell = true;
                    bool showProcon = true;
                    int nextPreset = 0;
                    int maxPreset = 5;
                    Random rnd = new Random();
                    String lastKey = "_LASTGM_";
                    String[] presets = { "Standard",
                                         "Classic",
                                         "Pistol",
                                         "DLC",
                                         "Troll" };
                    String msg = "Next GunMaster preset will be: ";
                    if (!allowTroll) maxPreset = 4;
                    if (server.Data.issetInt(lastKey)) lastPreset = server.Data.getInt(lastKey);
                    nextPreset = rnd.Next(maxPreset);
                    while (nextPreset == lastPreset)
                    {
                        nextPreset = rnd.Next(maxPreset);
                    }
                    plugin.ServerCommand("vars.gunMasterWeaponsPreset", nextPreset.ToString());
                    if (showChat) plugin.SendGlobalMessage(msg + presets[nextPreset]);
                    if (showYell) plugin.SendGlobalYell("\n" + msg + presets[nextPreset], 8);
                    if (showProcon) plugin.PRoConChat(msg + "^b^1" + presets[nextPreset] + "^0^n.");
                    server.Data.setInt(lastKey, nextPreset);
                }
            }
            catch (Exception e)
            {
                plugin.ConsoleException(e.ToString());
            }
        }
    )
);

gmrnd.Name = "GMPresetRandomizer";
gmrnd.Start();

return false;
steep100 u used an older version of the script! your version = v1.0, latest updated version on Page #1 is = v3.0

 

Use this updated script now

Code:

// BF4 Gunmaster Random Presets - Limit 1 of 1
// v3.0 - OnRoundOver - first_check
//

Thread gmrnd = new Thread(
    new ThreadStart(
        delegate
        {
            try
            {
                // USER SETTINGS
                //
                int iDelay = 0;
                int lastPreset = 0;
                bool ensureNight = true;
                bool allowStandard = true;
                bool allowClassic = true;
                bool allowPistol = true;
                bool allowDLC = true;
                bool allowTroll = true;
                bool allowNight = true;
                bool showChat = true;
                bool showYell = true;
                bool showProcon = true;
                //
                // END OF USER SETTINGS
                if (iDelay > 0)
                {
                    Thread.Sleep(iDelay * 1000);
                }
                if (server.NextGamemode == "GunMaster0" || server.NextGamemode == "GunMaster1")
                {
                    bool bGetting = true;
                    int nextPreset = 0;
                    int maxPreset = 6;
                    Random rnd = new Random();
                    String lastKey = "_LASTGM_";
                    String[] presets = { "Standard",
                                         "Classic",
                                         "Pistol",
                                         "DLC",
                                         "Troll",
                                         "Night" };
                    String msg = "Next GunMaster preset will be: ";
                    if (server.Data.issetInt(lastKey)) lastPreset = server.Data.getInt(lastKey);
                    nextPreset = rnd.Next(maxPreset);
                    if (ensureNight && server.NextMapFileName == "XP5_Night_01")
                    {
                        nextPreset = 5;
                    }
                    else
                    {
                        while (bGetting)
                        {
                            nextPreset = rnd.Next(maxPreset);
                            if (!allowStandard && nextPreset == 0) nextPreset = lastPreset;
                            if (!allowClassic && nextPreset == 1) nextPreset = lastPreset;
                            if (!allowPistol && nextPreset == 2) nextPreset = lastPreset;
                            if (!allowDLC && nextPreset == 3) nextPreset = lastPreset;
                            if (!allowTroll && nextPreset == 4) nextPreset = lastPreset;
                            if (!allowNight && nextPreset == 5) nextPreset = lastPreset;
                            if (nextPreset != lastPreset) bGetting = false;
                        }
                    }
                    plugin.ServerCommand("vars.gunMasterWeaponsPreset", nextPreset.ToString());
                    if (showChat) plugin.SendGlobalMessage(msg + presets[nextPreset]);
                    if (showYell) plugin.SendGlobalYell("\n" + msg + presets[nextPreset], 8);
                    if (showProcon) plugin.PRoConChat(msg + "^b^1" + presets[nextPreset] + "^0^n.");
                    server.Data.setInt(lastKey, nextPreset);
                }
            }
            catch (Exception e)
            {
                plugin.ConsoleException(e.ToString());
            }
        }
    )
);

gmrnd.Name = "GMPresetRandomizer";
gmrnd.Start();

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

Originally Posted by steep100*:

 

That is older code, post #1 of this thread has the latest version and supports Zavod: Graveyard Shift and Night weapons preset.

Are the rounds ending normally or being forced to end?

Is your end of round wait time 45 seconds or are you skipping this wait? (The wait where you can see the round's final scoreboard).

I know it's old code,the server runs votemap plugin,the wait time is 45 seconds,unfortunately the new code is not working in chat writes the next preset,but does not switch to it.For example, if the previous round was preset pistols,the plugin writes what will be DLC,but in the new round still preset guns
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

I know it's old code,the server runs votemap plugin,the wait time is 45 seconds,unfortunately the new code is not working in chat writes the next preset,but does not switch to it.For example, if the previous round was preset pistols,the plugin writes what will be DLC,but in the new round still preset guns

Try this:

Code:

// BF4 Gunmaster Random Presets - Limit 1 of 1
// v3.0 - OnRoundOver - first_check
//

Thread gmrnd = new Thread(
    new ThreadStart(
        delegate
        {
            try
            {
                // USER SETTINGS
                //
                int iDelay = 40;
                int lastPreset = 5;
                bool ensureNight = true;
                bool allowStandard = true;
                bool allowClassic = true;
                bool allowPistol = true;
                bool allowDLC = true;
                bool allowTroll = false;
                bool allowNight = true;
                bool showChat = true;
                bool showYell = true;
                bool showProcon = true;
                //
                // END OF USER SETTINGS
                if (iDelay > 0)
                {
                    Thread.Sleep(iDelay * 1000);
                }
                if (server.NextGamemode == "GunMaster0" || server.NextGamemode == "GunMaster1")
                {
                    bool bGetting = true;
                    int nextPreset = 0;
                    int maxPreset = 6;
                    Random rnd = new Random();
                    String lastKey = "_LASTGM_";
                    String[] presets = { "Standard",
                                         "Classic",
                                         "Pistol",
                                         "DLC",
                                         "Troll",
                                         "Night" };
                    String msg = "Next GunMaster preset will be: ";
                    if (server.Data.issetInt(lastKey)) lastPreset = server.Data.getInt(lastKey);
                    nextPreset = rnd.Next(maxPreset);
                    if (ensureNight && server.NextMapFileName == "XP5_Night_01")
                    {
                        nextPreset = 5;
                    }
                    else
                    {
                        while (bGetting)
                        {
                            nextPreset = rnd.Next(maxPreset);
                            if (!allowStandard && nextPreset == 0) nextPreset = lastPreset;
                            if (!allowClassic && nextPreset == 1) nextPreset = lastPreset;
                            if (!allowPistol && nextPreset == 2) nextPreset = lastPreset;
                            if (!allowDLC && nextPreset == 3) nextPreset = lastPreset;
                            if (!allowTroll && nextPreset == 4) nextPreset = lastPreset;
                            if (!allowNight && nextPreset == 5) nextPreset = lastPreset;
                            if (nextPreset != lastPreset) bGetting = false;
                        }
                    }
                    plugin.ServerCommand("vars.gunMasterWeaponsPreset", nextPreset.ToString());
                    if (showChat) plugin.SendGlobalMessage(msg + presets[nextPreset]);
                    if (showYell) plugin.SendGlobalYell("\n" + msg + presets[nextPreset], 8);
                    if (showProcon) plugin.PRoConChat(msg + "^b^1" + presets[nextPreset] + "^0^n.");
                    server.Data.setInt(lastKey, nextPreset);
                }
            }
            catch (Exception e)
            {
                plugin.ConsoleException(e.ToString());
            }
        }
    )
);

gmrnd.Name = "GMPresetRandomizer";
gmrnd.Start();

return false;

Anyone know why procon will not allow me the option to paste the code in the drop down box_!

You can't right click to paste, simply click in the code box and hit CTRL+V
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

Thank you this code works fine. Thanks from the whole club Funny Gamers:ohmy:

You're welcome, by the way, that code is the exact same code posted in post #1 only the settings were changed for your preferences. :ohmy:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by DER_M4DE*:

 

Hi LCARSx64,

I use the UMM (DOM and GM mixed) on our server . Should I put the "int iDelay" on 40? Is this better?

A few times when i changed the Map manually to GM Night Map, the preset wasn't night.

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

Originally Posted by LCARSx64*:

 

Hi LCARSx64,

I use the UMM (DOM and GM mixed) on our server . Should I put the "int iDelay" on 40? Is this better?

A few times when i changed the Map manually to GM Night Map, the preset wasn't night.

The delay is to ensure that xVoteMap and/or UMM both have a chance to do what they need to do before this limit sets the weapons preset, so yes, setting it to 40 will help make sure it work as intended.

If you are just selecting the next map before the end of a round, that should be fine as long as UMM doesn't change that. However, if you're actually referring to manually ending a round, then it won't work because no OnRoundOver event is triggered in such a case.

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

Originally Posted by DER_M4DE*:

 

The delay is to ensure that xVoteMap and/or UMM both have a chance to do what they need to do before this limit sets the weapons preset, so yes, setting it to 40 will help make sure it work as intended.

If you are just selecting the next map before the end of a round, that should be fine as long as UMM doesn't change that. However, if you're actually referring to manually ending a round, then it won't work because no OnRoundOver event is triggered in such a case.

Thanks for your answer!

i`ll change it to 40! :smile:

 

EDIT: everytime GM on NightMap have preset Standard what i`ve to change now?

Server preset "Custom" Server Type "Ranked"

vars.gunMasterWeaponsPreset "0"

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

Originally Posted by LCARSx64*:

 

Thanks for your answer!

i`ll change it to 40! :smile:

 

EDIT: everytime GM on NightMap have preset Standart what i`ve to change now?

Server preset "Custom" Server Type "Ranked"

Is that the map when you start the server or do you mean when it gets to a night map?

 

If it's when you start the server (so the first map is Zavod: Graveyard Shift) add the following to your server's startup.txt:

Code:

vars.gunMasterWeaponsPreset 5
also set int lastPreset to 5 in this limit.

You will need to restart the server after changing the startup.txt.

 

If it's only when you get to a night map (also if you only ever want the Night preset on these maps), make sure that bool ensureNight is set to true in this limit.

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

Originally Posted by DER_M4DE*:

 

If it's only when you get to a night map (also if you only ever want the Night preset on these maps), make sure that bool ensureNight is set to true in this limit.

this is what i want.

 

my Code

Code:

// BF4 Gunmaster Random Presets - Limit 1 of 1
// v3.0 - OnRoundOver - first_check
//

Thread gmrnd = new Thread(
    new ThreadStart(
        delegate
        {
            try
            {
                // USER SETTINGS
                //
                int iDelay = 40;
                int lastPreset = 0;
                bool ensureNight = true;
                bool allowStandard = true;
                bool allowClassic = true;
                bool allowPistol = true;
                bool allowDLC = true;
                bool allowTroll = true;
                bool allowNight = true;
                bool showChat = true;
                bool showYell = true;
                bool showProcon = true;
                //
                // END OF USER SETTINGS
                if (iDelay > 0)
                {
                    Thread.Sleep(iDelay * 1000);
                }
                if (server.NextGamemode == "GunMaster0" || server.NextGamemode == "GunMaster1")
                {
                    bool bGetting = true;
                    int nextPreset = 0;
                    int maxPreset = 6;
                    Random rnd = new Random();
                    String lastKey = "_LASTGM_";
                    String[] presets = { "Standard",
                                         "Classic",
                                         "Pistol",
                                         "DLC",
                                         "Troll",
                                         "Night" };
                    String msg = "Next GunMaster preset will be: ";
                    if (server.Data.issetInt(lastKey)) lastPreset = server.Data.getInt(lastKey);
                    nextPreset = rnd.Next(maxPreset);
                    if (ensureNight && server.NextMapFileName == "XP5_Night_01")
                    {
                        nextPreset = 5;
                    }
                    else
                    {
                        while (bGetting)
                        {
                            nextPreset = rnd.Next(maxPreset);
                            if (!allowStandard && nextPreset == 0) nextPreset = lastPreset;
                            if (!allowClassic && nextPreset == 1) nextPreset = lastPreset;
                            if (!allowPistol && nextPreset == 2) nextPreset = lastPreset;
                            if (!allowDLC && nextPreset == 3) nextPreset = lastPreset;
                            if (!allowTroll && nextPreset == 4) nextPreset = lastPreset;
                            if (!allowNight && nextPreset == 5) nextPreset = lastPreset;
                            if (nextPreset != lastPreset) bGetting = false;
                        }
                    }
                    plugin.ServerCommand("vars.gunMasterWeaponsPreset", nextPreset.ToString());
                    if (showChat) plugin.SendGlobalMessage(msg + presets[nextPreset]);
                    if (showYell) plugin.SendGlobalYell("\n" + msg + presets[nextPreset], 8);
                    if (showProcon) plugin.PRoConChat(msg + "^b^1" + presets[nextPreset] + "^0^n.");
                    server.Data.setInt(lastKey, nextPreset);
                }
            }
            catch (Exception e)
            {
                plugin.ConsoleException(e.ToString());
            }
        }
    )
);

gmrnd.Name = "GMPresetRandomizer";
gmrnd.Start();

return false;
but it doesnt work
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

this is what i want.

 

but it doesnt work

Hmmm, that should work. Try this ...

 

In the code, find the following line:

Code:

if (ensureNight && server.NextMapFileName == "XP5_Night_01")
Change it to:

Code:

if ((ensureNight != false) && (server.NextMapFileName == "XP5_Night_01"))
See if that helps.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

nothing! :-(

 

 

Edit: I cant change the vars.gunMasterWeaponsPreset to 5 on my server startuptext. i can set only 1-4 :huh:

I'm assuming that's using your GSP's interface, can you access the startup.txt directly? If so, add the vars to to end of it.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by DER_M4DE*:

 

I'm assuming that's using your GSP's interface, can you access the startup.txt directly? If so, add the vars to to end of it.

now i change the startup.txt to 5 and your script.

 

Code:

// BF4 Gunmaster Random Presets - Limit 1 of 1
// v3.0 - OnRoundOver - first_check
//

Thread gmrnd = new Thread(
    new ThreadStart(
        delegate
        {
            try
            {
                // USER SETTINGS
                //
                int iDelay = 40;
                int lastPreset = 5;
                bool ensureNight = true;
                bool allowStandard = true;
                bool allowClassic = true;
                bool allowPistol = true;
                bool allowDLC = true;
                bool allowTroll = true;
                bool allowNight = true;
                bool showChat = true;
                bool showYell = true;
                bool showProcon = true;
                //
                // END OF USER SETTINGS
                if (iDelay > 0)
                {
                    Thread.Sleep(iDelay * 1000);
                }
                if (server.NextGamemode == "GunMaster0" || server.NextGamemode == "GunMaster1")
                {
                    bool bGetting = true;
                    int nextPreset = 0;
                    int maxPreset = 6;
                    Random rnd = new Random();
                    String lastKey = "_LASTGM_";
                    String[] presets = { "Standard",
                                         "Classic",
                                         "Pistol",
                                         "DLC",
                                         "Troll",
                                         "Night" };
                    String msg = "Next GunMaster preset will be: ";
                    if (server.Data.issetInt(lastKey)) lastPreset = server.Data.getInt(lastKey);
                    nextPreset = rnd.Next(maxPreset);
                    if ((ensureNight != false) && (server.NextMapFileName == "XP5_Night_01"))
                    {
                        nextPreset = 5;
                    }
                    else
                    {
                        while (bGetting)
                        {
                            nextPreset = rnd.Next(maxPreset);
                            if (!allowStandard && nextPreset == 0) nextPreset = lastPreset;
                            if (!allowClassic && nextPreset == 1) nextPreset = lastPreset;
                            if (!allowPistol && nextPreset == 2) nextPreset = lastPreset;
                            if (!allowDLC && nextPreset == 3) nextPreset = lastPreset;
                            if (!allowTroll && nextPreset == 4) nextPreset = lastPreset;
                            if (!allowNight && nextPreset == 5) nextPreset = lastPreset;
                            if (nextPreset != lastPreset) bGetting = false;
                        }
                    }
                    plugin.ServerCommand("vars.gunMasterWeaponsPreset", nextPreset.ToString());
                    if (showChat) plugin.SendGlobalMessage(msg + presets[nextPreset]);
                    if (showYell) plugin.SendGlobalYell("\n" + msg + presets[nextPreset], 8);
                    if (showProcon) plugin.PRoConChat(msg + "^b^1" + presets[nextPreset] + "^0^n.");
                    server.Data.setInt(lastKey, nextPreset);
                }
            }
            catch (Exception e)
            {
                plugin.ConsoleException(e.ToString());
            }
        }
    )
);

gmrnd.Name = "GMPresetRandomizer";
gmrnd.Start();

return false;
it works fine, but only if i disable UMM

 

is UMM enabled it doesn`t work. Every GM preset is night

 

Edit: is UMM enabled, server said the next preset will be: pistol . But next Map is a night Map and the preset is pistol now.

I think the script changed the presets now, but no night preset on night maps if UMM is enabled.

if UMM is disabled the script works very fine

 

Edit#2 I`ve restartet the server and the layer and now it works! i don't know why, but it works.

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

Originally Posted by LCARSx64*:

 

now i change the startup.txt to 5 and your script.

 

it works fine, but only if i disable UMM

 

is UMM enabled it doesn`t work. Every GM preset is night

 

Edit: is UMM enabled, server said the next preset will be: pistol . But next Map is a night Map and the preset is pistol now.

I think the script changed the presets now, but no night preset on night maps if UMM is enabled.

if UMM is disabled the script works very fine

 

Edit#2 I`ve restartet the server and the layer and now it works! i don't know why, but it works.

That is an odd one, maybe UMM was messing with it until you restarted. Anyways, I'm glad it works now. :biggrin:
* 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.