ImportBot Posted April 19, 2014 Author Share Posted April 19, 2014 Originally Posted by EdgarAllan*: Yes sir! I figured posting it in this thread would be more helpful since someone could adapt it to fire off a message at any sort of ticket percentage/count. I went ahead and posted my request in that thread. Thanks! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 20, 2014 Author Share Posted April 20, 2014 Originally Posted by EBassie*: @PapaCharlie9: I want to build a limit to counter the "Black Loading Screen Between Rounds" issue. This is a serious problem and I think I have an idea on how to counter it with a limit, but need some help. Usually, after round end, the new map is loaded in about 90 secs, but when the "Black Loading Screen-Bug" occurs it can take up until 8 minutes before the new map is loaded and the players get see the real loading screen. Often when this happens the server dies out. But the many times I noticed the loading of the new map would take to long and I would issue a "Next Map" command. Almost every time I tried this, the server loads the next map and all is fine. Could we check this with a limit? Like when the time between "round end" and "Level Loaded" is longer than 120 secs -> issue a next map command. Plugin logs of normal round end and level loading: Code: [b][20:16:33] [/b]UltimateMapManager: INFO -> Round ended. Rounds run on this map list: 23 [20:16:33] [MULTIbalancer]:2 FINAL STATUS FOR PREVIOUS ROUND: [20:16:33] [MULTIbalancer]:2 Status: Winner was team 2 (CN) [20:16:33] [MULTIbalancer]:0 Status: Map = Guilin Peaks, mode = Conquest Large, time in round = 00:19:34, tickets = 0/201 <- [800] [20:16:33] [MULTIbalancer]:0 Status: Ticket difference = 201, ticket ratio percentage is 134%, score 145573/147042 [20:16:33] [MULTIbalancer]:0 Status: 0/17 raged, 10 reassigned, 1 balanced, 0 unstacked, 0 unswitched, 70 excluded, 0 exempted, 0 failed; of 1072 TOTAL [20:16:33] [MULTIbalancer]:0 Status: Team counts [63] = 32(US) vs 31(CN), with 1 unassigned, 0 commanders, 0 spectators [20:16:33] [MULTIbalancer]:2 +------------------------------------------------+ [20:17:23] UltimateMapManager: WORK -> Next map: Dragon Pass (Conquest Large). Setting server preset to Custom Preset: CQ LARGE 100%. [b][20:17:59] UltimateMapManager: INFO -> Level loaded.[/b]When it goes wrong:Code: [b][21:05:14][/b] UltimateMapManager: INFO -> Round ended. Rounds run on this map list: 25 [21:05:15] [MULTIbalancer]:2 FINAL STATUS FOR PREVIOUS ROUND: [21:05:15] [MULTIbalancer]:2 Status: Winner was team 1 (US) [21:05:15] [MULTIbalancer]:0 Status: Map = Caspian Border 2014, mode = Conquest Large, time in round = 00:18:40, tickets = 441/0 <- [800] [21:05:15] [MULTIbalancer]:0 Status: Ticket difference = 441, ticket ratio percentage is 223%, score 105934/84141 [21:05:15] [MULTIbalancer]:0 Status: 0/9 raged, 5 reassigned, 0 balanced, 0 unstacked, 0 unswitched, 29 excluded, 0 exempted, 0 failed; of 767 TOTAL [21:05:15] [MULTIbalancer]:0 Status: Team counts [62] = 32(US) vs 30(RU), with 2 unassigned, 0 commanders, 0 spectators [21:05:15] [MULTIbalancer]:2 +------------------------------------------------+ [21:06:05] UltimateMapManager: WORK -> Next map: Nansha Strike (Conquest Large). Setting server preset to Custom Preset: CQ LARGE 100%. [b][21:07:54] UltimateMapManager: INFO -> Level loaded.[/b] [21:07:55] UltimateMapManager: INFO -> Round restart requested. Rounds run on this map list: 26 [21:07:55] UltimateMapManager: WORK -> Next map: Nansha Strike (Conquest Large). Setting server preset to Custom Preset: CQ LARGE 100%. [b][21:07:56] UltimateMapManager: INFO -> Level loaded.[/b] [21:08:02] UltimateMapManager: INFO -> Next round requested. Rounds run on this map list: 27 [21:08:02] UltimateMapManager: WORK -> Next map: Wavebreaker (Conquest Large). Setting server preset to Custom Preset: CQ LARGE 100%. [b][21:08:13] UltimateMapManager: INFO -> Level loaded.[/b]It was stuck in loading until I did a next map command. (marked in blue) As you can see, when to problem occurs there are two "Level loaded" notifications because of this bug. The third one was because I issued a "Next Map" command. The first Level Loaded is already way past 90 secs, so I think it's safe to say we could issue a "Next Map" command here because otherwise the server seems to go into a loading loop and you can let it snap out of it using "Next Map". Your thoughts? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 21, 2014 Author Share Posted April 21, 2014 Originally Posted by PapaCharlie9*: @PapaCharlie9: I want to build a limit to counter the "Black Loading Screen Between Rounds" issue. This is a serious problem and I think I have an idea on how to counter it with a limit, but need some help. Usually, after round end, the new map is loaded in about 90 secs, but when the "Black Loading Screen-Bug" occurs it can take up until 8 minutes before the new map is loaded and the players get see the real loading screen. Often when this happens the server dies out. But the many times I noticed the loading of the new map would take to long and I would issue a "Next Map" command. Almost every time I tried this, the server loads the next map and all is fine. Could we check this with a limit? Like when the time between "round end" and "Level Loaded" is longer than 120 secs -> issue a next map command. Plugin logs of normal round end and level loading: Code: [b][20:16:33] [/b]UltimateMapManager: INFO -> Round ended. Rounds run on this map list: 23 [20:16:33] [MULTIbalancer]:2 FINAL STATUS FOR PREVIOUS ROUND: [20:16:33] [MULTIbalancer]:2 Status: Winner was team 2 (CN) [20:16:33] [MULTIbalancer]:0 Status: Map = Guilin Peaks, mode = Conquest Large, time in round = 00:19:34, tickets = 0/201 <- [800] [20:16:33] [MULTIbalancer]:0 Status: Ticket difference = 201, ticket ratio percentage is 134%, score 145573/147042 [20:16:33] [MULTIbalancer]:0 Status: 0/17 raged, 10 reassigned, 1 balanced, 0 unstacked, 0 unswitched, 70 excluded, 0 exempted, 0 failed; of 1072 TOTAL [20:16:33] [MULTIbalancer]:0 Status: Team counts [63] = 32(US) vs 31(CN), with 1 unassigned, 0 commanders, 0 spectators [20:16:33] [MULTIbalancer]:2 +------------------------------------------------+ [20:17:23] UltimateMapManager: WORK -> Next map: Dragon Pass (Conquest Large). Setting server preset to Custom Preset: CQ LARGE 100%. [b][20:17:59] UltimateMapManager: INFO -> Level loaded.[/b]When it goes wrong:Code: [b][21:05:14][/b] UltimateMapManager: INFO -> Round ended. Rounds run on this map list: 25 [21:05:15] [MULTIbalancer]:2 FINAL STATUS FOR PREVIOUS ROUND: [21:05:15] [MULTIbalancer]:2 Status: Winner was team 1 (US) [21:05:15] [MULTIbalancer]:0 Status: Map = Caspian Border 2014, mode = Conquest Large, time in round = 00:18:40, tickets = 441/0 <- [800] [21:05:15] [MULTIbalancer]:0 Status: Ticket difference = 441, ticket ratio percentage is 223%, score 105934/84141 [21:05:15] [MULTIbalancer]:0 Status: 0/9 raged, 5 reassigned, 0 balanced, 0 unstacked, 0 unswitched, 29 excluded, 0 exempted, 0 failed; of 767 TOTAL [21:05:15] [MULTIbalancer]:0 Status: Team counts [62] = 32(US) vs 30(RU), with 2 unassigned, 0 commanders, 0 spectators [21:05:15] [MULTIbalancer]:2 +------------------------------------------------+ [21:06:05] UltimateMapManager: WORK -> Next map: Nansha Strike (Conquest Large). Setting server preset to Custom Preset: CQ LARGE 100%. [b][21:07:54] UltimateMapManager: INFO -> Level loaded.[/b] [21:07:55] UltimateMapManager: INFO -> Round restart requested. Rounds run on this map list: 26 [21:07:55] UltimateMapManager: WORK -> Next map: Nansha Strike (Conquest Large). Setting server preset to Custom Preset: CQ LARGE 100%. [b][21:07:56] UltimateMapManager: INFO -> Level loaded.[/b] [21:08:02] UltimateMapManager: INFO -> Next round requested. Rounds run on this map list: 27 [21:08:02] UltimateMapManager: WORK -> Next map: Wavebreaker (Conquest Large). Setting server preset to Custom Preset: CQ LARGE 100%. [b][21:08:13] UltimateMapManager: INFO -> Level loaded.[/b]It was stuck in loading until I did a next map command. (marked in blue) As you can see, when to problem occurs there are two "Level loaded" notifications because of this bug. The third one was because I issued a "Next Map" command. The first Level Loaded is already way past 90 secs, so I think it's safe to say we could issue a "Next Map" command here because otherwise the server seems to go into a loading loop and you can let it snap out of it using "Next Map". Your thoughts? Short answer is, unfortunately, no. Insane Limits doesn't expose the OnLevelLoaded event. I think you've got a good idea, but it will have to be done as a full plugin. That said, I'd advise looking at the raw console.log events and timing. A normal round end/round start cycle can and does exceed 90 seconds -- I've seen pretty wide variance while trying to pick a single number for when to scramble teams, some map/mode combos take longer than others. It's also slightly proportional to the number of players in the server. It may be that the double load level of exactly the same map/mode would be a better indicator than elapsed time. Not to mention that it's much easier not to use time, in terms of the code. For the plugin, if you do have to use time, you might be able to do it with a procon.protected.tasks.add that does a mapList.runNextRound. Set the delay to the maximum amount of time you are willing to wait for the next round to load. You can tell a level has actually loaded and started if you see an OnPlayerTeamChange some time after the OnLevelLoaded. You can set the delay in the procon.protected.tasks.add from whatever starting point you decide -- might as well be the first OnLevelLoaded. Then, one of two things happen: 1) Normally, the OnPlayerTeamChange happens, which would issue a procon.protected.tasks.remove before time runs out, or 2) no OnPlayerTeamChange event is seen and time runs out on the delayed task. Then you don't have to write any timer code yourself. EDIT: I looked at some console.log timings for full TDM and Conquest servers. The time between onLevelLoaded and the first onTeamChange is between 15 and 30 seconds. All the team changes happen in 1 to 5 seconds, proportional to number of players. Then the first spawn is 0 to 5 seconds after that. So if the timer is set to 60 seconds, that should be plenty of time for a round to start normally. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 22, 2014 Author Share Posted April 22, 2014 Originally Posted by EBassie*: Short answer is, unfortunately, no. Insane Limits doesn't expose the OnLevelLoaded event.Hmm, too bad. I think you've got a good idea, but it will have to be done as a full plugin. That said, I'd advise looking at the raw console.log events and timing. A normal round end/round start cycle can and does exceed 90 seconds -- I've seen pretty wide variance while trying to pick a single number for when to scramble teams, some map/mode combos take longer than others. It's also slightly proportional to the number of players in the server. It may be that the double load level of exactly the same map/mode would be a better indicator than elapsed time. Not to mention that it's much easier not to use time, in terms of the code. Well, on my fully populated 64 slots CQ server the timespan between rounds (round end - level loaded) never exceeds 90 secs. Usually it's even lower: 70 secs. DICE will fix this bug, but for the time being I hoped for a simple and dirty workaround. For the plugin, if you do have to use time, you might be able to do it with a procon.protected.tasks.add that does a mapList.runNextRound. Set the delay to the maximum amount of time you are willing to wait for the next round to load. You can tell a level has actually loaded and started if you see an OnPlayerTeamChange some time after the OnLevelLoaded. You can set the delay in the procon.protected.tasks.add from whatever starting point you decide -- might as well be the first OnLevelLoaded. Then, one of two things happen: 1) Normally, the OnPlayerTeamChange happens, which would issue a procon.protected.tasks.remove before time runs out, or 2) no OnPlayerTeamChange event is seen and time runs out on the delayed task. Then you don't have to write any timer code yourself.Unfortunately I don't have the experience nor the time (going on vacation at the end of the week) in making this plugin. As said, I hoped for a quick and dirty solution using IL for the time being until DICE fixes it. I'll just keep nagging DL about it, to hurry f. up * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 22, 2014 Author Share Posted April 22, 2014 Originally Posted by hollebolle*: hi there, hi papa so, i have another request for a vote to restart the actual map. I tried to edit your !surrender -script, but after 2 days i don't get it ... Although I get a !voterestart on the server and the round is ending, but there is no vote before and the round ends immediately -.- What i try to do is a simple vote for all players on the server (whether Team A or Team so they can call a "!voterestart" and the current round ends. e.g.: A player types !voterestart (server says something like "PLAYER X wants a maprestart! Type !yes for restart, !no against restart.") and 75 precent of all players on the server have to vote with !yes or !no for or against the restart. hope, someone can help me thanks and regards holle ps: sorry for my english, I try my best * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 22, 2014 Author Share Posted April 22, 2014 Originally Posted by Blaze2014*: Hey ihave 2 questions to you.How i set all digits from 0123456789 in only digits__Just know is only 0-1 set in this example.I will use all digits forbidden in player name.charter shall be allowed.Example if player name like this:135987643.How i write in code to change this__Question 2:Iwill only have eng-swe in chat (speak)And forbidden example france,dutch,etc in chat.Can i do that in create code__Jonas Set limit to evaluate OnJoin, set action to Say | PRoConEvent | Log | Kick. Set first_check to this Expression: Code: ( Regex.Match(player.Name, @"^[0-9]+$").Success )Set the action specific settings to something like the following. This shows the settings for limit_1, but if your limit is a different number, for example "3", look for "limit_3_kick_message", etc. Code: limit_1_say_message %p_fn% kicked for bad player name, all digits! limit_1_say_audience All limit_1_say_delay 0 limit_1_procon_chat True limit_1_procon_event_text Attempting to kick %p_fn% for bad player name, all digits limit_1_procon_event_player Insane Limits limit_1_log_destination Plugin limit_1_log_message [%date% %time%] %p_fn% kicked for bad name: all digits limit_1_kick_message bad player name: all digits * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 22, 2014 Author Share Posted April 22, 2014 Originally Posted by PapaCharlie9*: hi there, hi papa so, i have another request for a vote to restart the actual map. I tried to edit your !surrender -script, but after 2 days i don't get it ... Although I get a !voterestart on the server and the round is ending, but there is no vote before and the round ends immediately -.- What i try to do is a simple vote for all players on the server (whether Team A or Team so they can call a "!voterestart" and the current round ends. e.g.: A player types !voterestart (server says something like "PLAYER X wants a maprestart! Type !yes for restart, !no against restart.") and 75 precent of all players on the server have to vote with !yes or !no for or against the restart. hope, someone can help me thanks and regards holle ps: sorry for my english, I try my best You don't have to change the limit, it already does what you want. You type !votenext and instead of !yes or !no, other players also type !votenext. Players on either team can vote, but players on the winning team aren't allowed to vote more than the losing team -- this prevents the winning team from getting a few points ahead and clinching the win before the losing team even gets a chance to do anything. myrcon.net/...insane-limits-v09r6-vote-to-nuke-campingbase-raping-team-or-surrender#entry28837 If you want to change !votenext to !voterestart, find this line of code: Code: Match nextMatch = Regex.Match(player.LastChat, @"^\s*[@!](_:surrender|vote\s*next)", RegexOptions.IgnoreCase);and change it to this: Code: Match nextMatch = Regex.Match(player.LastChat, @"^\s*[@!]vote\s*restart", RegexOptions.IgnoreCase);If you have further questions, please post them in that thread rather than here. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 22, 2014 Author Share Posted April 22, 2014 Originally Posted by PapaCharlie9*: Hey ihave 2 questions to you.How i set all digits from 0123456789 in only digits__Just know is only 0-1 set in this example.I will use all digits forbidden in player name.charter shall be allowed.Example if player name like this:135987643.How i write in code to change this__Question 2:Iwill only have eng-swe in chat (speak)And forbidden example france,dutch,etc in chat.Can i do that in create code__Jonas Set limit to evaluate OnJoin, set action to Say | PRoConEvent | Log | Kick. Set first_check to this Expression: Code: ( Regex.Match(player.Name, @"^[0-9]+$").Success )Set the action specific settings to something like the following. This shows the settings for limit_1, but if your limit is a different number, for example "3", look for "limit_3_kick_message", etc. Code: limit_1_say_message %p_fn% kicked for bad player name, all digits! limit_1_say_audience All limit_1_say_delay 0 limit_1_procon_chat True limit_1_procon_event_text Attempting to kick %p_fn% for bad player name, all digits limit_1_procon_event_player Insane Limits limit_1_log_destination Plugin limit_1_log_message [%date% %time%] %p_fn% kicked for bad name: all digits limit_1_kick_message bad player name: all digits Question 1: I don't understand. The limit will match any sequence of numbers, not just 0-1. It should match 1746826, for example. Question 2: It's not possible to detect whether chat is in one language or another. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 22, 2014 Author Share Posted April 22, 2014 Originally Posted by p19blo*: Couple requests First is it possible to temporary ban a player for using anything but helicopters to kill ? Heli superioritty server second, how can i make it some both sides have the same helicopter ? Thank you. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 23, 2014 Author Share Posted April 23, 2014 Originally Posted by TMiland*: Couple requests First is it possible to temporary ban a player for using anything but helicopters to kill ? Heli superioritty server second, how can i make it some both sides have the same helicopter ? Thank you. You could try this: OnKill first check code Code: // Message templates // {0} will be replaced with PlayerName // {1} will be replaced by prohibited weapon/vehicle name, see below String autoKilled = "{0} AUTO-KILLED for using the PROHIBITED {1}"; String autoKicked = "{0} AUTO-KICKED for using the PROHIBITED {1}"; String tempBan = "{0} TEMP BAN 1 HOUR for using the PROHIBITED {1}"; String yellKilled = "The {1} is prohibited. You will be AUTO-KICKED if you use it again."; // Times int yellTime = 20; // seconds int banTime = 60; // minutes double multiKillTime = 5; // seconds // Weapon/vehicle codes bool isHELI = Regex.Match(kill.Weapon, @"(AH1Z|Mi28)").Success; /* CODE */ if (!isHELI) return false; String prohibited = "Heli"; String key = "PersistHeli_" + prohibited + "_" + killer.Name; int count = 0; if (plugin.Data.issetInt(key)) count = plugin.Data.getInt(key); DateTime last = DateTime.MinValue; if (server.Data.issetObject(key)) last = (DateTime)server.Data.getObject(key); if (DateTime.Now.Subtract(last).TotalSeconds <= multiKillTime) return false; server.Data.setObject(key, (Object)DateTime.Now); count = count + 1; String msg = null; if (count == 1) { // First Violation: Kill msg = String.Format(autoKilled, killer.Name, prohibited); plugin.SendGlobalMessage(msg); plugin.SendPlayerYell(killer.Name, String.Format(yellKilled, killer.Name, prohibited), yellTime); plugin.PRoConChat("ADMIN > " + msg); plugin.PRoConEvent(msg, "Insane Limits"); plugin.KillPlayer(killer.Name, 6); } else if (count == 2) { // Second Violation: Kick msg = String.Format(autoKicked, killer.Name, prohibited); plugin.SendGlobalMessage(msg); plugin.PRoConChat("ADMIN > " + msg); plugin.PRoConEvent(msg, "Insane Limits"); plugin.KickPlayerWithMessage(killer.Name, msg); } else { // Third or subsequent Violation: TBan msg = String.Format(tempBan, killer.Name, prohibited); plugin.SendGlobalMessage(msg); plugin.PRoConChat("ADMIN > " + msg); plugin.PRoConEvent(msg, "Insane Limits"); plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, banTime, msg); } plugin.Data.setInt(key, count); return false;This will prohibit AH1Z and Mi28. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 23, 2014 Author Share Posted April 23, 2014 Originally Posted by p19blo*: You could try this: OnKill first check code Code: // Message templates // {0} will be replaced with PlayerName // {1} will be replaced by prohibited weapon/vehicle name, see below String autoKilled = "{0} AUTO-KILLED for using the PROHIBITED {1}"; String autoKicked = "{0} AUTO-KICKED for using the PROHIBITED {1}"; String tempBan = "{0} TEMP BAN 1 HOUR for using the PROHIBITED {1}"; String yellKilled = "The {1} is prohibited. You will be AUTO-KICKED if you use it again."; // Times int yellTime = 20; // seconds int banTime = 60; // minutes double multiKillTime = 5; // seconds // Weapon/vehicle codes bool isHELI = Regex.Match(kill.Weapon, @"(AH1Z|Mi28)").Success; /* CODE */ if (!isHELI) return false; String prohibited = "Heli"; String key = "PersistHeli_" + prohibited + "_" + killer.Name; int count = 0; if (plugin.Data.issetInt(key)) count = plugin.Data.getInt(key); DateTime last = DateTime.MinValue; if (server.Data.issetObject(key)) last = (DateTime)server.Data.getObject(key); if (DateTime.Now.Subtract(last).TotalSeconds <= multiKillTime) return false; server.Data.setObject(key, (Object)DateTime.Now); count = count + 1; String msg = null; if (count == 1) { // First Violation: Kill msg = String.Format(autoKilled, killer.Name, prohibited); plugin.SendGlobalMessage(msg); plugin.SendPlayerYell(killer.Name, String.Format(yellKilled, killer.Name, prohibited), yellTime); plugin.PRoConChat("ADMIN > " + msg); plugin.PRoConEvent(msg, "Insane Limits"); plugin.KillPlayer(killer.Name, 6); } else if (count == 2) { // Second Violation: Kick msg = String.Format(autoKicked, killer.Name, prohibited); plugin.SendGlobalMessage(msg); plugin.PRoConChat("ADMIN > " + msg); plugin.PRoConEvent(msg, "Insane Limits"); plugin.KickPlayerWithMessage(killer.Name, msg); } else { // Third or subsequent Violation: TBan msg = String.Format(tempBan, killer.Name, prohibited); plugin.SendGlobalMessage(msg); plugin.PRoConChat("ADMIN > " + msg); plugin.PRoConEvent(msg, "Insane Limits"); plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, banTime, msg); } plugin.Data.setInt(key, count); return false;This will prohibit AH1Z and Mi28. Thank you. I did want to prohibit everuything but the helis. Im assuming i stick in the name of everything but the helis in the kill weapon part? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 23, 2014 Author Share Posted April 23, 2014 Originally Posted by LCARSx64*: Thank you. I did want to prohibit everuything but the helis. Im assuming i stick in the name of everything but the helis in the kill weapon part?I'm pretty sure you could use TMiland's code, just change this line in the first_check:Code: /* CODE */ if (!isHELI) return false;change to: Code: /* CODE */ if (isHELI) return false;Also you'll need to go through and change the outputted messages a little. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 23, 2014 Author Share Posted April 23, 2014 Originally Posted by TMiland*: Ah crap, sorry. My head was on backwards last night lol! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 23, 2014 Author Share Posted April 23, 2014 Originally Posted by Tobsen03*: Hello Guys.... I want to have Rule in my Insame Limits.... I need a !punish Rule.... Please help my * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 23, 2014 Author Share Posted April 23, 2014 Originally Posted by TMiland*: Hello Guys.... I want to have Rule in my Insame Limits.... I need a !punish Rule.... Please help my Take a look at this: Punish: showthread....ll=1#post99483* Forgive: showthread....l=1#post100074* * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 23, 2014 Author Share Posted April 23, 2014 Originally Posted by Tobsen03*: Hmm looks nice but i need a Whitelist for my Member.... * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 23, 2014 Author Share Posted April 23, 2014 Originally Posted by TMiland*: Hmm looks nice but i need a Whitelist for my Member....What should he be whitelisted from? To be Punished? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 23, 2014 Author Share Posted April 23, 2014 Originally Posted by Tobsen03*: Yes * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 23, 2014 Author Share Posted April 23, 2014 Originally Posted by TMiland*: YesYou could try this: Create a new list called "whitelist" f.eks, and add your player to it. And add this to the top of the tk limit: Code: if (plugin.isInList(player.Name, "whitelist")) return false;Or, if you have him in the reserved slots list: Code: List<String> ReservervedSlots = plugin.GetReservedSlotsList(); if (ReservervedSlots.Contains(player.Name)) { return false; }Add either of them below:Code: String key = "Last_TK";I have no idea if this works, use with caution! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 23, 2014 Author Share Posted April 23, 2014 Originally Posted by PapaCharlie9*: I'm pretty sure you could use TMiland's code, just change this line in the first_check:Nice job, TMiland and LCARS! @p19blo, what exactly do you mean by helis? Attack choppers? Littlebirds? Transport? All? You'll have to tweak the list of codes depending on your answer. Your second question, make both teams have the same choppers, can only be done by making both teams the same faction. You can do that in your Startup.txt for the server, or just type the commands into the Procon Console Window and restart the round. For example, to make both teams be US faction: Code: vars.teamFactionOverride 1 0 vars.teamFactionOVerride 2 0The first number is the team id, the second is the faction (US = 0, RU = 1, CN = 2). This doesn't work on Official servers, of course. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 23, 2014 Author Share Posted April 23, 2014 Originally Posted by PapaCharlie9*: You could try this: Create a new list called "whitelist" f.eks, and add your player to it. And add this to the top of the tk limit: Code: if (plugin.isInList(player.Name, "whitelist")) return false;Or, if you have him in the reserved slots list: Code: List<String> ReservervedSlots = plugin.GetReservedSlotsList(); if (ReservervedSlots.Contains(player.Name)) { return false; }Add either of them below:Code: String key = "Last_TK";I have no idea if this works, use with caution! If you want to Whitelist all of your limits with the same list, you can use the built-in global whitelist at the top of the settings, use_white_list set to True. That will open up a new section in settings called Whitelist, with clan_white_list for tags and player_white_list for player names. Again, this blocks ALL limits. If there is even just one limit that you don't want to pay attention to the whitelist, you have to do it the way TMiland suggested. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 23, 2014 Author Share Posted April 23, 2014 Originally Posted by LCARSx64*: @PapaCharlie9, just a quick question. Since the clan_white_list contains tags and not names, the following scenario wouldn't work would it? I have two players: Player1's full name is: [AAA] PlayerA Player2's full name is: [bBB] PlayerB player_white_list contains only: PlayerA clan_white_list contains only: BBB I have a limit with the following line: Code: if (plugin.isInWhitelist(player.Name))Wouldn't this fail (the function return false) if the player that triggered it was Player2 (PlayerB)?Also, in the Insane Limits post Plugin Object there is the following:Code: bool isInClanWhitelist(String PlayerName);Would this not be as follows?Code: bool isInClanWhitelist(String PlayerTag); * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 23, 2014 Author Share Posted April 23, 2014 Originally Posted by TMiland*: Nice job, TMiland and LCARS! @p19blo, what exactly do you mean by helis? Attack choppers? Littlebirds? Transport? All? You'll have to tweak the list of codes depending on your answer. Your second question, make both teams have the same choppers, can only be done by making both teams the same faction. You can do that in your Startup.txt for the server, or just type the commands into the Procon Console Window and restart the round. For example, to make both teams be US faction: Code: vars.teamFactionOverride 1 0 vars.teamFactionOVerride 2 0The first number is the team id, the second is the faction (US = 0, RU = 1, CN = 2). This doesn't work on Official servers, of course.Thanks! If you want to Whitelist all of your limits with the same list, you can use the built-in global whitelist at the top of the settings, use_white_list set to True. That will open up a new section in settings called Whitelist, with clan_white_list for tags and player_white_list for player names. Again, this blocks ALL limits. If there is even just one limit that you don't want to pay attention to the whitelist, you have to do it the way TMiland suggested.I wasn't aware of that! Nice * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 24, 2014 Author Share Posted April 24, 2014 Originally Posted by TMiland*: I have a request, and i am not sure if i have seen it before, but here it goes: What i need is Factions based on maps: RU vs US on: Dawnbreaker, Siege of Shanghai, Lancang Dam - basically where the attack helicopters are facing each other. CN vs RU on: Paracel Storm, Hainan Resort - maps where Attack Boats are present. Rest of maps: default / random. So, i have this version of Random Factions: Code: string msg = "none"; Random rnd = new Random(); int Team1 = rnd.Next(0, 3); int Team2 = rnd.Next(0, 3); while (Team1 == Team2) { Team2 = rnd.Next(0, 3); } Dictionary<int,String> Teams = new Dictionary<int,String>(); Teams.Add(0, "US"); Teams.Add(1, "Russia"); Teams.Add(2, "China"); plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(Team1)); plugin.ServerCommand("vars.teamFactionOverride", "2", Convert.ToString(Team2)); msg = "Scrambling next round team factions..."; plugin.SendGlobalMessage(msg, 12); plugin.ConsoleWrite("^b^1ADMIN SCRAMBLE >^0^n " + msg); plugin.PRoConChat("^b^1ADMIN SCRAMBLE >^0^n " + msg); plugin.PRoConEvent(msg, "Insane Limits"); return false;Changed it to this: Code: string msg = "none"; Random rnd = new Random(); int Team1 = rnd.Next(0, 3); int Team2 = rnd.Next(0, 3); while (Team1 == Team2) { Team2 = rnd.Next(0, 3); } Dictionary<int,String> Teams = new Dictionary<int,String>(); Teams.Add(0, "US"); Teams.Add(1, "Russia"); Teams.Add(2, "China"); if (server.NextMapFileName == "MP_Tremors" || server.NextMapFileName == "MP_Siege" || server.NextMapFileName == "MP_Damage") { plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(1)); plugin.ServerCommand("vars.teamFactionOverride", "2", Convert.ToString(0)); msg = "Setting factions to RU vs US on next round..."; } else if (server.NextMapFileName == "MP_Naval" || server.NextMapFileName == "MP_Resort" || server.NextMapFileName == "MP_Damage") { plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(2)); plugin.ServerCommand("vars.teamFactionOverride", "2", Convert.ToString(1)); msg = "Setting factions to CN vs RU on next round..."; } else { plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(Team1)); plugin.ServerCommand("vars.teamFactionOverride", "2", Convert.ToString(Team2)); msg = "Scrambling next round team factions..."; } plugin.SendGlobalMessage(msg, 12); plugin.ConsoleWrite("^b^1ADMIN SCRAMBLE >^0^n " + msg); plugin.PRoConChat("^b^1ADMIN SCRAMBLE >^0^n " + msg); plugin.PRoConEvent(msg, "Insane Limits"); return false;Question is, will it work? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 24, 2014 Author Share Posted April 24, 2014 Originally Posted by LCARSx64*: I have a request, and i am not sure if i have seen it before, but here it goes: What i need is Factions based on maps: So, i have this version of Random Factions: Code: string msg = "none"; Random rnd = new Random(); int Team1 = rnd.Next(0, 3); int Team2 = rnd.Next(0, 3); while (Team1 == Team2) { Team2 = rnd.Next(0, 3); } Dictionary<int,String> Teams = new Dictionary<int,String>(); Teams.Add(0, "US"); Teams.Add(1, "Russia"); Teams.Add(2, "China"); plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(Team1)); plugin.ServerCommand("vars.teamFactionOverride", "2", Convert.ToString(Team2)); msg = "Scrambling next round team factions..."; plugin.SendGlobalMessage(msg, 12); plugin.ConsoleWrite("^b^1ADMIN SCRAMBLE >^0^n " + msg); plugin.PRoConChat("^b^1ADMIN SCRAMBLE >^0^n " + msg); plugin.PRoConEvent(msg, "Insane Limits"); return false;Changed it to this: Code: string msg = "none"; Random rnd = new Random(); int Team1 = rnd.Next(0, 3); int Team2 = rnd.Next(0, 3); while (Team1 == Team2) { Team2 = rnd.Next(0, 3); } Dictionary<int,String> Teams = new Dictionary<int,String>(); Teams.Add(0, "US"); Teams.Add(1, "Russia"); Teams.Add(2, "China"); if (server.NextMapFileName == "MP_Tremors" || server.NextMapFileName == "MP_Siege" || server.NextMapFileName == "MP_Damage") { plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(1)); plugin.ServerCommand("vars.teamFactionOverride", "2", Convert.ToString(0)); msg = "Setting factions to RU vs US on next round..."; } else if (server.NextMapFileName == "MP_Naval" || server.NextMapFileName == "MP_Resort" || server.NextMapFileName == "MP_Damage") { plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(2)); plugin.ServerCommand("vars.teamFactionOverride", "2", Convert.ToString(1)); msg = "Setting factions to CN vs RU on next round..."; } else { plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(Team1)); plugin.ServerCommand("vars.teamFactionOverride", "2", Convert.ToString(Team2)); msg = "Scrambling next round team factions..."; } plugin.SendGlobalMessage(msg, 12); plugin.ConsoleWrite("^b^1ADMIN SCRAMBLE >^0^n " + msg); plugin.PRoConChat("^b^1ADMIN SCRAMBLE >^0^n " + msg); plugin.PRoConEvent(msg, "Insane Limits"); return false;Question is, will it work? I don't see why it shouldn't work, however there's a couple of mistakes in your code:Code: server.NextMapFilenameShould be:Code: server.NextMapFileNameYou also have "MP_Damage" in both the first and second if evaluations. I have made some edits to your code and have come up with this: Code: String msg = "none"; int Team1 = 0; int Team2 = 0; Dictionary<int,String> Teams = new Dictionary<int,String>(); Teams.Add(0, "US"); Teams.Add(1, "RU"); Teams.Add(2, "CN"); switch (server.NextMapFileName) { case "MP_Tremors": case "MP_Siege": case "MP_Damage": Team1 = 1; Team2 = 0; break; case "MP_Naval": case "MP_Resort": Team1 = 2; Team2 = 1; break; default: Random rnd = new Random(); Team1 = rnd.Next(0, 3); Team2 = rnd.Next(0, 3); while (Team1 == Team2) { Team2 = rnd.Next(0, 3); } break; } plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(Team1)); plugin.ServerCommand("vars.teamFactionOverride", "2", Convert.ToString(Team2)); msg = "Setting factions to " + Teams[Team1] + " vs " + Teams[Team2] + " on next round..."; plugin.SendGlobalMessage(msg, 12); plugin.ConsoleWrite("^b^1ADMIN SCRAMBLE >^0^n " + msg); plugin.PRoConChat("^b^1ADMIN SCRAMBLE >^0^n " + msg); plugin.PRoConEvent(msg, "Insane Limits"); return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 25, 2014 Author Share Posted April 25, 2014 Originally Posted by TMiland*: I don't see why it shouldn't work, however there's a couple of mistakes in your code: Code: server.NextMapFilenameShould be:Code: server.NextMapFileNameYou also have "MP_Damage" in both the first and second if evaluations. I have made some edits to your code and have come up with this: Code: String msg = "none"; int Team1 = 0; int Team2 = 0; Dictionary<int,String> Teams = new Dictionary<int,String>(); Teams.Add(0, "US"); Teams.Add(1, "RU"); Teams.Add(2, "CN"); switch (server.NextMapFileName) { case "MP_Tremors": case "MP_Siege": case "MP_Damage": Team1 = 1; Team2 = 0; break; case "MP_Naval": case "MP_Resort": Team1 = 2; Team2 = 1; break; default: Random rnd = new Random(); Team1 = rnd.Next(0, 3); Team2 = rnd.Next(0, 3); while (Team1 == Team2) { Team2 = rnd.Next(0, 3); } break; } plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(Team1)); plugin.ServerCommand("vars.teamFactionOverride", "2", Convert.ToString(Team2)); msg = "Setting factions to " + Teams[Team1] + " vs " + Teams[Team2] + " on next round..."; plugin.SendGlobalMessage(msg, 12); plugin.ConsoleWrite("^b^1ADMIN SCRAMBLE >^0^n " + msg); plugin.PRoConChat("^b^1ADMIN SCRAMBLE >^0^n " + msg); plugin.PRoConEvent(msg, "Insane Limits"); return false; This is why i post it here, because my head is running on it's own sometimes lol! Thanks for the help, running it now to see how it goes! *edit [23:58:21] ADMIN SCRAMBLE > Setting factions to RU vs US on next round... On Siege of Shanghai, it is US vs CH now, so i guess it didn't work... Could that be because of xVoteMap? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 25, 2014 Author Share Posted April 25, 2014 Originally Posted by LCARSx64*: This is why i post it here, because my head is running it's own sometimes lol! Thanks for the help, running it now to see how it goes! *edit [23:58:21] ADMIN SCRAMBLE > Setting factions to RU vs US on next round... On Siege of Shanghai, it is US vs CH now, so i guess it didn't work... Could that be because of xVoteMap? It's possible, try disabling xVoteMap and see if it works (manually set the next map). * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 25, 2014 Author Share Posted April 25, 2014 Originally Posted by TMiland*: It's possible, try disabling xVoteMap and see if it works (manually set the next map). After reading this post by PC9: myrcon.net/...insane-limits-requests#entry27046 I have changed the code to this: Code: plugin.ServerCommand("mapList.getMapIndices"); int nextRound = server.CurrentRound + 2; if (nextRound > server.TotalRounds) nextRound = 1; if ((server.CurrentRound +1) < server.TotalRounds) { plugin.ConsoleWrite("^2Next round is ^b" + plugin.FriendlyMapName(server.MapFileName) + "^n, round " + (server.CurrentRound+1) + " of " + server.TotalRounds + ", with " + server.PlayerCount + " players remaining"); return false; } plugin.ConsoleWrite("^2Next map is ^b" + plugin.FriendlyMapName(server.NextMapFileName) + "^n, round " + nextRound + ", with " + server.PlayerCount + " players remaining"); String msg = "none"; int Team1 = 0; int Team2 = 0; Dictionary<int,String> Teams = new Dictionary<int,String>(); Teams.Add(0, "US"); Teams.Add(1, "RU"); Teams.Add(2, "CN"); switch (server.NextMapFileName) { case "MP_Tremors": case "MP_Siege": case "MP_Damage": case "MP_Journey": Team1 = 1; Team2 = 0; break; case "MP_Naval": case "MP_Resort": Team1 = 2; Team2 = 1; break; default: Random rnd = new Random(); Team1 = rnd.Next(0, 3); Team2 = rnd.Next(0, 3); while (Team1 == Team2) { Team2 = rnd.Next(0, 3); } break; } plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(Team1)); plugin.ServerCommand("vars.teamFactionOverride", "2", Convert.ToString(Team2)); msg = "Next map is:" + plugin.FriendlyMapName(server.NextMapFileName) + "Setting factions to " + Teams[Team1] + " vs " + Teams[Team2] + " on next round..."; plugin.SendGlobalMessage(msg, 12); plugin.ConsoleWrite("^b^1ADMIN FACTIONS >^0^n " + msg); plugin.PRoConChat("^b^1ADMIN FACTIONS >^0^n " + msg); plugin.PRoConEvent(msg, "Insane Limits"); return false;So it's not doing anything if on round 1, but sets the factions on round 2 end. The line:Code: this.ExecuteCommand("procon.protected.send", "mapList.getMapIndices");has been added to the latest xVoteMaps. *edit But still it's not setting the right factions it seems... [12:26:26] ADMIN FACTIONS > Setting factions to RU vs US on next round... And it's running Lancang Dam with RU vs CH *Edit2 I can see it is setting the right faction on round end, but on the next map, something has overridden the factions and set them to something else. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 25, 2014 Author Share Posted April 25, 2014 Originally Posted by Blaze2014*: Hej Papa.Okej this code not works.When players use this digits,example :1356788854 this action nerver happen,kick.Whats wrong With code_Jonas * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 25, 2014 Author Share Posted April 25, 2014 Originally Posted by PapaCharlie9*: @PapaCharlie9, just a quick question. Since the clan_white_list contains tags and not names, the following scenario wouldn't work would it? Also, in the Insane Limits post Plugin Object there is the following: Code: bool isInClanWhitelist(String PlayerName);Would this not be as follows?Code: bool isInClanWhitelist(String PlayerTag); Short answer: it does the right thing. isInWhitelist calls both isInPlayerWhitelist and isInClanWhitelist. isInClanWhitelist uses the player's name to look up the player's tag. So using plugin.isInWhitelist(String PlayerName) is all you have to use to check both lists correctly. * 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.