ImportBot Posted September 1, 2015 Author Share Posted September 1, 2015 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 which is your advanced version? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 1, 2015 Author Share Posted September 1, 2015 Originally Posted by LCARSx64*: ok which is your advanced version? It's not released yet, I've been waiting for the summer update to ensure it supports it. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 1, 2015 Author Share Posted September 1, 2015 Originally Posted by DER_M4DE*: It's not released yet, I've been waiting for the summer update to ensure it supports it.ah ok, my mistake!!! mistranslation * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 2, 2015 Author Share Posted September 2, 2015 Originally Posted by LCARSx64*: I decided to update this since servers running it did not have the new Night weapons preset. Post #1 updated with the new version. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 2, 2015 Author Share Posted September 2, 2015 Originally Posted by DER_M4DE*: Post #1 updated with the new version.thanks alot * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 3, 2015 Author Share Posted September 3, 2015 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
ImportBot Posted September 3, 2015 Author Share Posted September 3, 2015 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
ImportBot Posted September 4, 2015 Author Share Posted September 4, 2015 Originally Posted by steep100*: I try this code, but no work(( * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 4, 2015 Author Share Posted September 4, 2015 Originally Posted by LCARSx64*: I try this code, but no work((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.? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 4, 2015 Author Share Posted September 4, 2015 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
ImportBot Posted September 5, 2015 Author Share Posted September 5, 2015 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
ImportBot Posted September 5, 2015 Author Share Posted September 5, 2015 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 4063In 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
ImportBot Posted September 5, 2015 Author Share Posted September 5, 2015 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 roundHere 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
ImportBot Posted September 5, 2015 Author Share Posted September 5, 2015 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 roundThat 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
ImportBot Posted September 5, 2015 Author Share Posted September 5, 2015 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
ImportBot Posted September 5, 2015 Author Share Posted September 5, 2015 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
ImportBot Posted September 5, 2015 Author Share Posted September 5, 2015 Originally Posted by oldschool*: Anyone know why procon will not allow me the option to paste the code in the drop down box_! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 5, 2015 Author Share Posted September 5, 2015 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 gunsTry 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
ImportBot Posted September 5, 2015 Author Share Posted September 5, 2015 Originally Posted by steep100*: Thank you this code works fine. Thanks from the whole club Funny Gamers:ohmy: * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 6, 2015 Author Share Posted September 6, 2015 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. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 6, 2015 Author Share Posted September 6, 2015 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
ImportBot Posted September 6, 2015 Author Share Posted September 6, 2015 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
ImportBot Posted September 6, 2015 Author Share Posted September 6, 2015 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! 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
ImportBot Posted September 6, 2015 Author Share Posted September 6, 2015 Originally Posted by LCARSx64*: Thanks for your answer! i`ll change it to 40! 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 5also 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
ImportBot Posted September 6, 2015 Author Share Posted September 6, 2015 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
ImportBot Posted September 6, 2015 Author Share Posted September 6, 2015 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
ImportBot Posted September 6, 2015 Author Share Posted September 6, 2015 Originally Posted by DER_M4DE*: nothing! :-( Edit: I cant change the vars.gunMasterWeaponsPreset to 5 on my server startuptext. i can set only 1-4 * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 6, 2015 Author Share Posted September 6, 2015 Originally Posted by LCARSx64*: nothing! :-( Edit: I cant change the vars.gunMasterWeaponsPreset to 5 on my server startuptext. i can set only 1-4 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
ImportBot Posted September 6, 2015 Author Share Posted September 6, 2015 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
ImportBot Posted September 6, 2015 Author Share Posted September 6, 2015 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. * Restored post. It could be that the author is no longer active. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.