ImportBot Posted October 30, 2015 Author Share Posted October 30, 2015 Originally Posted by tazmo8448*: Can someone help me with a single 30000 layer server (Gameservers) to be able to change the guns in gun master. I know it is 0 thru 4 and it is in the .vars files but my issue is there is no listing in my .vars files listing that is shown in the forum. Below is what I have seen: vars.gunMasterWeaponsPreset X Where X is: 0 - Standard 1 - Classic 2 - Pistol 3 - DLC 4 - Troll I need to know where to locate the above file in the server as ProCon doesn't allow me to set .vars because there is no parent layer (like 17000 layer) so can I or do I need the second lower layer? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted October 30, 2015 Author Share Posted October 30, 2015 Originally Posted by LCARSx64*: Can someone help me with a single 30000 layer server (Gameservers) to be able to change the guns in gun master. I know it is 0 thru 4 and it is in the .vars files but my issue is there is no listing in my .vars files listing that is shown in the forum. Below is what I have seen: vars.gunMasterWeaponsPreset X Where X is: 0 - Standard 1 - Classic 2 - Pistol 3 - DLC 4 - Troll I need to know where to locate the above file in the server as ProCon doesn't allow me to set .vars because there is no parent layer (like 17000 layer) so can I or do I need the second lower layer? Firstly, I don't know what you mean by 30000 layer and 17000 layer, also, the values of the vars (since battlefield 4 night operations DLC) are 0 through to 5, they are: 0 - Standard 1 - Classic 2 - Pistol 3 - DLC 4 - Troll 5 - NightIn any case, I'd assume you'd still have a startup.txt. You can add a line containing vars.gunMasterWeaponsPreset X to that, e.g.:- To set the initial Gun Master weapons preset to DLC, you'd add this line to the startup.txt: Code: vars.gunMasterWeaponsPreset 3 * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted October 30, 2015 Author Share Posted October 30, 2015 Originally Posted by tazmo8448*: Got it figured out: open ProCon then navigate to the Consoles tab it opens to scrolling messages as to what was inserted to each game, at the bottom there is an empty box that will insert the command vars.gunMasterWeaponsPreset ''0'' the zero represents which option you want ergo: 0=Standard 1=Classic 2=Pistol 3=DLC 4=Troll 5=Night Gun Master Mode Presets Standard (Weapons Preset 0) A-91 with Compensator and Stubby Grip M60-E4 with M145, Compensator and Ergo Grip AN-94 with PK-A, Heavy Barrel and Stubby Grip DEagle 44 with Compensator QBU-88 with JGM-4, Laser Sight, Muzzle Brake and Ergo Grip M249 with HOLO, Magnifier, Compensator and Bipod Saiga 12K with PKA-S and Ergo Grip QBZ-95-1 with Prisma, Green Laser Sight and Vertical Grip 870 MCS with HD-33, Modified Choke and 12G Dart UMP-45 with HOLO, Laser Sight and Potato Grip M4 with HOLO and Angled Grip AS VAL with Kobra, Green Laser Sight and Angled Grip L96A1 with M145, Green Laser Sight, Flash Hider and Straight Pull Bolt Unica 6 with Mini G18 with Muzzle Brake P226 with Green Laser Sight Bayonet (Knife) Classic (Weapons Preset 1) MP443 93R .44 Magnum MP7 P90 SPAS-12 USAS-12 ACW-R MTAR-21 AUG A3 SAR-21 LSAT L86A2 SCAR-H JNG-90 M320 LVG Bayonet (Knife) Pistol (Weapons Preset 2) P226 M9 QSZ-92 MP443 Shorty 12G G18 FN57 M1911 93R CZ-75 .44 Magnum Compact 45 M412 REX SW40 Unica 6 DEagle 44 Mare's Leg Survival (Knife) DLC (Weapons Preset 3) F2000 DAO-12 M60-E4 GOL Magnum L85A2 SR-2 AWS SR338 SW40 MPX Bulldog CS5 Unica 6 DEagle 44 Rorsch Mk-1 Phantom Icicle (Knife) Troll (Weapons Preset 4) Ballistic Shield Phantom Hawk 12G FAMAS AEK-971 Shorty 12G Phantom RPK-12 QBZ-95B-1 M4 ACW-R Phantom with Explosive Tip SVD-12 M98B M1911 Defibrillator C100 (Knife) hit send and you should see the scroll message ExecuteOnNextRound then the preset you selected will be played on the next Gun Master you choose. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 1, 2015 Author Share Posted December 1, 2015 Originally Posted by 397Seth*: Hello, I've been trying to get this plug in to work for two weeks now. Whatever I do, it is not working. At first I didnt have an entry in the startup.txt. The plug in said what preset would be next but never changed it. It was stuck to classic. Now I entered a value in the startup and so it is running on that preset (DLC) on every map. Regardless which (even night). I rebooted layer and server multiple time. Even disabled UMM, nothing helpes. Has anyone an idea left? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 1, 2015 Author Share Posted December 1, 2015 Originally Posted by LCARSx64*: Hello, I've been trying to get this plug in to work for two weeks now. Whatever I do, it is not working. At first I didnt have an entry in the startup.txt. The plug in said what preset would be next but never changed it. It was stuck to classic. Now I entered a value in the startup and so it is running on that preset (DLC) on every map. Regardless which (even night). I rebooted layer and server multiple time. Even disabled UMM, nothing helpes. Has anyone an idea left? Since you indicated that you use UMM then you need this limit to execute after UMM. For that, use the same code that is in post #1, only find the following line:Code: int iDelay = 0;and change the value 0 to 40, like so:Code: int iDelay = 40;Hopefully that will fix your issue(s). * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 1, 2015 Author Share Posted December 1, 2015 Originally Posted by 397Seth*: Since you indicated that you use UMM then you need this limit to execute after UMM. For that, use the same code that is in post #1, only find the following line: Code: int iDelay = 0;and change the value 0 to 40, like so:Code: int iDelay = 40;Hopefully that will fix your issue(s).Hi,I already have the delay set to 40 :-( * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 14, 2015 Author Share Posted December 14, 2015 Originally Posted by westyjoe*: Having a problem with our gunmaster gun randomizing working since the community map update. We are running on Fragnet (1.5.1.2) and have insane limits (0.9.17.0). We do not use troll (4) and want the night maps to use only night guns (5). The night guns setting is not working. Please advise where this code is having a problem if you can figure it out. In the startup.txt we have the following setting vars.gunMasterWeaponsPreset "3" thanks in advance! limit_1_state Enabled limit_1_name BF4 Gunmaster Random Presets limit_1_evaluation OnRoundOver limit_1_first_check Code limit_1_first_check_code Code: Thread gmrnd = new Thread( new ThreadStart( delegate { try { // USER SETTINGS // int iDelay = 0; int lastPreset = 3; bool ensureNight = true; bool allowStandard = true; bool allowClassic = true; bool allowPistol = false; bool allowDLC = true; bool allowTroll = false; bool allowNight = true; bool showChat = false; bool showYell = false; 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;limit_1_second_check disabledlimit_1_new_action ... limit_1_action None * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 14, 2015 Author Share Posted December 14, 2015 Originally Posted by LCARSx64*: Having a problem with our gunmaster gun randomizing working since the community map update. We are running on Fragnet (1.5.1.2) and have insane limits (0.9.17.0). We do not use troll (4) and want the night maps to use only night guns (5). The night guns setting is not working. Please advise where this code is having a problem if you can figure it out. In the startup.txt we have the following setting vars.gunMasterWeaponsPreset "3" thanks in advance! limit_1_state Enabled limit_1_name BF4 Gunmaster Random Presets limit_1_evaluation OnRoundOver limit_1_first_check Code limit_1_first_check_code Code: Thread gmrnd = new Thread( new ThreadStart( delegate { try { // USER SETTINGS // int iDelay = 0; int lastPreset = 3; bool ensureNight = true; bool allowStandard = true; bool allowClassic = true; bool allowPistol = false; bool allowDLC = true; bool allowTroll = false; bool allowNight = true; bool showChat = false; bool showYell = false; 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;limit_1_second_check disabledlimit_1_new_action ... limit_1_action None That's a little odd, the community map update shouldn't have any effect on this limit.You don't by chance use xVotemap and/or UMM (Ultimate Map Manager) plugins do you? In any case, try adding in the delay and see if that fixes the problem. To do that, in the code, find: Code: int iDelay = 0;and change it to:Code: int iDelay = 40; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 15, 2015 Author Share Posted December 15, 2015 Originally Posted by westyjoe*: That's a little odd, the community map update shouldn't have any effect on this limit. You don't by chance use xVotemap and/or UMM (Ultimate Map Manager) plugins do you? In any case, try adding in the delay and see if that fixes the problem. To do that, in the code, find: Code: int iDelay = 0;and change it to:Code: int iDelay = 40; We don't use either of those, but I will try switching it to let you know. By the way, we only now seem to be getting the default package (3). * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 17, 2015 Author Share Posted December 17, 2015 Originally Posted by westyjoe*: Still no love. the iDelay apparently had no effect. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 19, 2015 Author Share Posted December 19, 2015 Originally Posted by LCARSx64*: Still no love. the iDelay apparently had no effect.Curious, I'm with fragnet and it works fine. Have you tried restarting your server and layer? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 20, 2015 Author Share Posted December 20, 2015 Originally Posted by westyjoe*: A number of times. Keeps coming up with loadout 3 (the one set as default in the vars in startup file) * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 20, 2015 Author Share Posted December 20, 2015 Originally Posted by LCARSx64*: A number of times. Keeps coming up with loadout 3 (the one set as default in the vars in startup file)Ok, just so we can rule these out: In Insane Limits settings section 1. Settings, is virtual_mode set to False? Is the limit's state enabled, e.g. limit_1_state set to Enabled? Are the rounds ending normally and you are not manually ending them? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 20, 2015 Author Share Posted December 20, 2015 Originally Posted by leandro-motta*: NOT know if it's the problem of the plugin but the hosting server if i3dnet unfortunately their is incomplete panel does not have the gun night master and even leaving Standard it does not change the modo.Isso cycle at least in my case so far without solution. gun master.jpggun master 2.jpg * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 21, 2015 Author Share Posted December 21, 2015 Originally Posted by westyjoe*: Ok, just so we can rule these out: In Insane Limits settings section 1. Settings, is virtual_mode set to False? Is the limit's state enabled, e.g. limit_1_state set to Enabled? Are the rounds ending normally and you are not manually ending them? 1. Yes2. Yes 3. Yes and no. In last game played today, the round prior had a message saying next gunmaster preset will be: Night, but it came up as loadout 3, not 5 (night) * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 12, 2016 Author Share Posted January 12, 2016 Originally Posted by ikii*: I loaded this plugin I ran a mix mode and multimap server. But when running GM it does not randomize the presets. Limit was set to OnRoundEnd I have ran it on OnRoundStart now and still the same Was running it on int iDelay = 0 Now int iDelay = 40 And nothing... Any suggestions? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 13, 2016 Author Share Posted January 13, 2016 Originally Posted by leandro-motta*: As well as a response had not decided optido changing the delay could only leaving all active and delay 60 because 40 did not change my attempts to use here just to see swap preset after rotate 2x the same but already help. // 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 = 60; 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 && 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 January 20, 2016 Author Share Posted January 20, 2016 Originally Posted by LCARSx64*: 1. Yes 2. Yes 3. Yes and no. In last game played today, the round prior had a message saying next gunmaster preset will be: Night, but it came up as loadout 3, not 5 (night) I loaded this plugin I ran a mix mode and multimap server. But when running GM it does not randomize the presets. Limit was set to OnRoundEnd I have ran it on OnRoundStart now and still the same Was running it on int iDelay = 0 Now int iDelay = 40 And nothing... Any suggestions? As well as a response had not decided optido changing the delay could only leaving all active and delay 60 because 40 did not change my attempts to use here just to see swap preset after rotate 2x the same but already help.Currently, I don't have access to a game server on which to test any code. I will see if I can isolate the issue as soon as I can. It's odd that this problem only seems to effect some people and not others. Also, leandro motta, please put any code between code tags in future: [CODE] ... [/code] * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 26, 2016 Author Share Posted January 26, 2016 Originally Posted by ikii*: LCARSx64 I can give you access to my server when you want. #[TAG]60Hz|HC|MiniMap|Mapvote|MultiMode|NoHighPingers * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 27, 2016 Author Share Posted January 27, 2016 Originally Posted by leandro-motta*: Currently, I don't have access to a game server on which to test any code. I will see if I can isolate the issue as soon as I can. It's odd that this problem only seems to effect some people and not others. Also, leandro motta, please put any code between code tags in future: [CODE] ... [/code] Sorry for the strange post error before changed correctly but now at least is working with error but nothing to panic type when you enter the classic mode in the next map will again be the classic is running 2 times then but this swapping * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 25, 2018 Author Share Posted March 25, 2018 Originally Posted by westyjoe*: Over the last few weeks, the presets randomizing doesn't work (stays on the one preset continually). When starting Procon we are getting the following errors (the XXXXXX contains our username): " [10:33:20 21] [insane Limits] Thread(settings): Compiling Limit #1 - BF4 Gunmaster Random Presets - OnRoundOver [10:33:20 28] [insane Limits] Thread(settings): ERROR: 1 error compiling Code [10:33:20 28] [insane Limits] Thread(settings): ERROR: (CS1583, line: 0, column: 0): 'e:\UserFiles\XXXXXX\GameServers\TC156155600854334 08757844\Plugins\BF3\CSC49C9.tmp' is not a valid Win32 resource file " Here's the code we use: 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 = false; 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 March 28, 2018 Author Share Posted March 28, 2018 Originally Posted by LCARSx64*: Over the last few weeks, the presets randomizing doesn't work (stays on the one preset continually). When starting Procon we are getting the following errors (the XXXXXX contains our username): " [10:33:20 21] [insane Limits] Thread(settings): Compiling Limit #1 - BF4 Gunmaster Random Presets - OnRoundOver [10:33:20 28] [insane Limits] Thread(settings): ERROR: 1 error compiling Code [10:33:20 28] [insane Limits] Thread(settings): ERROR: (CS1583, line: 0, column: 0): 'e:\UserFiles\XXXXXX\GameServers\TC156155600854334 08757844\Plugins\BF3\CSC49C9.tmp' is not a valid Win32 resource file " Here's the code we use: 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 = false; 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; The code looks fine, I don't see any missing brackets/braces or colons etc. I would suggest you remove and re-add the limit and see if that helps.[10:33:20 28] [insane Limits] Thread(settings): ERROR: (CS1583, line: 0, column: 0): 'e:\UserFiles\XXXXXX\GameServers\TC156155600854334 08757844\Plugins\BF3\CSC49C9.tmp' is not a valid Win32 resource file " * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 30, 2018 Author Share Posted March 30, 2018 Originally Posted by westyjoe*: " Reached out to our server provider and that was exactly the problem - a log fault was using up all freespace on our server. They fixed it and the code is working well again. Thanks! * 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.