ImportBot Posted June 4, 2014 Author Share Posted June 4, 2014 Originally Posted by LCARSx64*: Would love to learn how to write these scripts better but did not find a link anywhere on how to get varables etc Has there been a manual made up or a wiki My ultimate idea is when server if full once round has ended and teams are full remove 2 players from non local country (kind of like country kicker) Limits are written in C# so you will need an understanding of this language. As for "variables" such as Name, Rank, Score etc., these are obtained from the objects Insane Limits supply. Scroll down ...* to see those. Also, take a look at other people's limits to get an idea of how they are doing things. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 4, 2014 Author Share Posted June 4, 2014 Originally Posted by kcuestag*: Is there any limit that displays the next map from time to time or at round end? We used to have this function with Votemap but we've disabled it and now we want to let our players which map is next. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 4, 2014 Author Share Posted June 4, 2014 Originally Posted by tarreltje*: Yes, look a few pages back. I also had asked for a next map announcer. You will find 2 limits pc9 made. 1 that announces the next level, and 1 limit that announces the next 3 levels Verstuurd vanaf mijn Nexus 5 met Tapatalk * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 4, 2014 Author Share Posted June 4, 2014 Originally Posted by kcuestag*: Yes, look a few pages back. I also had asked for a next map announcer. You will find 2 limits pc9 made. 1 that announces the next level, and 1 limit that announces the next 3 levels Verstuurd vanaf mijn Nexus 5 met Tapatalk That's awesome, thanks! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 4, 2014 Author Share Posted June 4, 2014 Originally Posted by tarreltje*: Both limits are on page 191 Verstuurd vanaf mijn Nexus 5 met Tapatalk * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 4, 2014 Author Share Posted June 4, 2014 Originally Posted by kcuestag*: Found them, but not too sure how to set it up (evaluation, eval_interval, first check, first check code... etc). * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 4, 2014 Author Share Posted June 4, 2014 Originally Posted by tarreltje*: Page 188, there you can find all the info you need! Verstuurd vanaf mijn Nexus 5 met Tapatalk * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 4, 2014 Author Share Posted June 4, 2014 Originally Posted by PapaCharlie9*: Would love to learn how to write these scripts better but did not find a link anywhere on how to get varables etc Has there been a manual made up or a wiki There's no manual or wiki on how to write new limits. The theory has always been "learn by example". You can browse through simple, almost no-coding-required examples here: myrcon.net/.../insane-limits-examples More complex some-knowledge-of-coding-required examples are individual threads in this forum. After you look through a half dozen or so, some patterns will be clear that can be copied. The ultimate reference for the API is in the Plugin Details tab of the plugin itself in Procon. Post #1 of the Insane Limits plugin thread is also an API reference, but sometimes I forget to update it. My ultimate idea is when server if full once round has ended and teams are full remove 2 players from non local country (kind of like country kicker)That is possible to do, but very likely unnecessary. I've never seen a server stay full with the same player list from one round to the next. Some players always drop out after the end of the round. They may immediately be replaced by waiting list players and the next round may start full, but not with exactly the same list of players. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 5, 2014 Author Share Posted June 5, 2014 Originally Posted by kcuestag*: Page 188, there you can find all the info you need! Verstuurd vanaf mijn Nexus 5 met Tapatalk But that limit is for your tags and stuff, does the same thing apply here for the "next map announcement" limit? Thanks. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 5, 2014 Author Share Posted June 5, 2014 Originally Posted by PapaCharlie9*: FWIW, it's better to provide post numbers or the link to the specific post (click on the post number), rather than page numbers. The number of posts per page is configurable and/or can vary between TapATalk and browser. I show more posts per page, so my page numbers are totally different from anyone elses (unless they make the same customization in their forum settings). @kcuestag, watch the video in post #1 of the Insane Limits plugin thread. Make sure you go to YouTube to watch it, so you can watch it full screen. It shows how to set up a new limit. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 5, 2014 Author Share Posted June 5, 2014 Originally Posted by tarreltje*: But that limit is for your tags and stuff, does the same thing apply here for the "next map announcement" limit? Thanks. Crap you were right.... But i have found the 1 that i used: showthread....t-map-and-mode* The only thing i changed was the yell into a Say, so it spams the chat with the next map * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 5, 2014 Author Share Posted June 5, 2014 Originally Posted by kcuestag*: Thanks!! Could you paste here the code you're using? I changed SendGlobalYell to SendGlobalSay and it gives an error: [17:43:55 21] [insane Limits] Thread(settings): Compiling Limit #1 - Display Next Map and Mode - OnIntervalServer [17:43:55 26] [insane Limits] Thread(settings): ERROR: 1 error compiling Code [17:43:55 26] [insane Limits] Thread(settings): ERROR: (CS0117, line: 66, column: 20): 'PRoConEvents.PluginInterface' does not contain a definition for 'SendGlobalSay' * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 5, 2014 Author Share Posted June 5, 2014 Originally Posted by tarreltje*: plugin.ServerCommand("admin.say", "The next map will be " + mapName + " on " + modeName, "all"); and otherwise past the code i posted on page 191 * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 5, 2014 Author Share Posted June 5, 2014 Originally Posted by kcuestag*: Thanks, I'll give it a try. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 17, 2014 Author Share Posted June 17, 2014 Originally Posted by Sponge*: Hey Need some help still spent a bit of time today learning but could use some help I want to turn on a limit to kick all non AU and NZ players if the player count is over 14 at the start pt the round This is what I have come up with so far but need to do this better evaluation on round start code int threshold=14; if (server.PlayerCount>threshold) { plugin.PRoConChat("Total players greater then threshold kicking over seas players"); // this is just to alert me it is working return true; } else { } return false; second check code if (!Regex.Match(player.CountryCode, "(NZ|AU)", RegexOptions.IgnoreCase).Success) { plugin.PRoConChat("Kicking over seas players : " + player.Name); plugin.KickPlayerWithMessage(player.Name, "Sorry, The server is in peak usage kicking Non Aus and NZ Players"); return false; } This does not seem to be working also would like to find out how to enhance it. Ideally if the start of the round has 14 players kick all player onjoin that round who's out side AUS and NZ but next round if players start is less then 14 let all players in that round * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 17, 2014 Author Share Posted June 17, 2014 Originally Posted by LCARSx64*: Hey Need some help still spent a bit of time today learning but could use some help I want to turn on a limit to kick all non AU and NZ players if the player count is over 14 at the start pt the round This is what I have come up with so far but need to do this better evaluation on round start code second check code This does not seem to be working also would like to find out how to enhance it. Ideally if the start of the round has 14 players kick all player onjoin that round who's out side AUS and NZ but next round if players start is less then 14 let all players in that round If you really wanted to use the OnRoundStart event, this will do it: OnRoundStart Non-AU & NZ Kicker Create a new limit to evaluate OnRoundStart. Set action to None. Set first_check to this Code: Code: // Non-AU & NZ Kicker int iThreshold = 14; if (server.PlayerCount <= iThreshold) return false; plugin.PRoConChat("^9Threshold exceeded: Kicking all overseas players!^0"); List<PlayerInfoInterface> lstPlayers = new List<PlayerInfoInterface>(); lstPlayers.AddRange(team1.players); lstPlayers.AddRange(team2.players); foreach (PlayerInfoInterface p in lstPlayers) { if (!Regex.Match(p.CountryCode, "(AU|NZ)", RegexOptions.IgnoreCase).Success) { // Player is non-AU/NZ, so kick plugin.KickPlayerWithMessage(p.Name, "The server is at peak usage kicking Non AU & NZ players, sorry!"); } } return false; For your ideal scenario, this will work: OnJoin Non-AU & NZ Kicker Create a new limit to evaluate OnJoin. Set action to Kick with these settings: Code: kick_message = The server is at peak usage kicking Non AU & NZ players, sorry!Set first_check to this Expression:Code: (server.PlayerCount > 14 && !Regex.Match(player.CountryCode, "(AU|NZ)", RegexOptions.IgnoreCase).Success) End of post! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 17, 2014 Author Share Posted June 17, 2014 Originally Posted by PapaCharlie9*: The idea is problematic to begin with. Once you start kicking, the count may go below 14. Suppose you have 16 players, 4 of them are "far". Using the looping OnRoundStart version, you'll end up with 12 players. I don't think that's what you want. You could bail out of the loop by decrementing a counter initialized to server.PlayerCount, but why kick some "far" players and not others? No matter how you do the kicking, what's to stop them from coming back? Unless you use both limits at the same time, which seems necessary to me. What I would suggest is look at what the count would be after kicking the far players, and only kick/block from joining after purging the "far" players gives you a count that is equal to or greater than the threshold. So, in my 16 with 4 scenario, nothing would happen, because 12 If 5 more players join, one of which is far, you have 21 players total, 5 of which are far. 21 - 5 = 16, which is more than 14, so you would kick and impose the block. Obviously, this can't run the kick loop once at round start. You'd have to do it on an interval or on every join/leave. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 18, 2014 Author Share Posted June 18, 2014 Originally Posted by Sponge*: Thankyou both for the replies. PapaCharlie9 the problematic issue what you mentioned is what I want the desired result to be kicking all players and keeping all players out the following round from out side the desired country. once the next round starts if the player limit is low then open up the server again. during peak times we have a que of players wanting to join. I have country kicker plugin working now but once I get over 14 players it auto kicks the disallowed countries (I find this rude as a player might be half way through a round and they get kicked) Once my server has started it will run with local players and comes full very quickly for quite some time I have our clan that populates it well but out side peak times it dies down and we need the foreign players to keep it running. So logic follows round start 14 players kick all players from over seas (yeah I know it might kick lots of players) keep all players from over seas out this round (somehow setting a variable turned on from the first limit) round start under 14 players Allow overseas players to join this round (somehow setting variable from player start check to turn off country kicker for the full round) I do this now manually and has a full Aussie server most days from 5pm to 11pm which is populated well as players know they get good pings. but occasionally the server dies early and would like to open it backup to foreign players to get the influx of players to keep the game going Again thankyou for your responses * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 18, 2014 Author Share Posted June 18, 2014 Originally Posted by bckrv*: Hello Papa and mates, Since BF3 free my server Pistol only server is unplayable, new players with low rank join and start to shoot without read the server rules. Is possible to limit to rank to join my server with Insane Limits, if yes please can you help me? I would like to block low ranks till 1>20. Thanks for your help, regards * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 18, 2014 Author Share Posted June 18, 2014 Originally Posted by c0re*: Hello How can I block all Ip within such range" 123.456.789.xxx? with insane limits? Thanks. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 18, 2014 Author Share Posted June 18, 2014 Originally Posted by LCARSx64*: Hello How can I block all Ip within such range" 123.456.789.xxx? with insane limits? Thanks. If it's just that select range (123.456.789.0 to 123.456.789.255) you could just use this: Block IP Range Create a new limit to evaluate OnJoin. Set action to Kick with these settings: Code: kick_message = Sorry, Your IP address range is blocked on this server!Set first_check to this Expression:Code: (player.IPAddress.StartsWith("123.456.789.")) If you wanted to block a group of different IP ranges, you could use a custom list and do it like this: Block IP Ranges Set use_custom_lists to True and create a new list with these parameters: Code: name = blocked_ips data = 111.222.333., 222.333.444., etc.Create a new limit to evaluate OnJoin. Set action to Kick with these settings:Code: kick_message = Sorry, Your IP address range is blocked on this server!Set first_check to this Expression:Code: (plugin.isInList(player.IPAddress.Substring(0, player.IPAddress.LastIndexOf(".") + 1), "blocked_ips")) * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 18, 2014 Author Share Posted June 18, 2014 Originally Posted by PapaCharlie9*: So logic follows round start 14 players kick all players from over seas (yeah I know it might kick lots of players) keep all players from over seas out this round (somehow setting a variable turned on from the first limit) round start under 14 players Allow overseas players to join this round (somehow setting variable from player start check to turn off country kicker for the full round) I do this now manually and has a full Aussie server most days from 5pm to 11pm which is populated well as players know they get good pings. but occasionally the server dies early and would like to open it backup to foreign players to get the influx of players to keep the game going Again thankyou for your responses But you still haven't addressed the main objection: what if at round start there are 14 players in the server and all of them are from the US? Your server will be empty after applying the logic from above. That's not what you want, right? The logic should be: Round Start If total players MINUS over seas players is less than or equal to 14, do nothing. If total players MINUS over seas players is greater than 14, kick overseas players AND block them from joining for rest of round There's no additional variable needed. LCARS just needs to modify the expressions used to compare against iThreshold. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 18, 2014 Author Share Posted June 18, 2014 Originally Posted by PapaCharlie9*: Hello Papa and mates, Since BF3 free my server Pistol only server is unplayable, new players with low rank join and start to shoot without read the server rules. Is possible to limit to rank to join my server with Insane Limits, if yes please can you help me? I would like to block low ranks till 1>20. Thanks for your help, regards Post the limit code you are using for pistols only. Put it in markup. I need to understand why your temp ban isn't sufficient to punish the noobs. It shouldn't matter if a rank 5 shoots everyone up with an assault rifle. They should get banned for doing so, end of problem. EDIT: And stop using 0.0.0.8, that's ancient. Update to 0.9.16.0 please. It works for BF3 also. showthread....0-12-MAR-2014)* * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 18, 2014 Author Share Posted June 18, 2014 Originally Posted by LCARSx64*: But you still haven't addressed the main objection: what if at round start there are 14 players in the server and all of them are from the US? Your server will be empty after applying the logic from above. That's not what you want, right? The logic should be: Round Start If total players MINUS over seas players is less than or equal to 14, do nothing. If total players MINUS over seas players is greater than 14, kick overseas players AND block them from joining for rest of round There's no additional variable needed. LCARS just needs to modify the expressions used to compare against iThreshold. Do you mean changing the OnRoundStart event code to something like the following?Code: // Non-AU & NZ Kicker int iThreshold = 14; int iCount = 0; if (server.PlayerCount <= iThreshold) return false; List<PlayerInfoInterface> lstPlayers = new List<PlayerInfoInterface>(); lstPlayers.AddRange(team1.players); lstPlayers.AddRange(team2.players); foreach (PlayerInfoInterface p in lstPlayers) { if (!Regex.Match(p.CountryCode, "(AU|NZ)", RegexOptions.IgnoreCase).Success) iCount++; } // If kicking OS players drops the server count lower then threshold, exit if (server.PlayerCount - iCount <= iThreshold) return false; plugin.PRoConChat("^9Threshold exceeded: Kicking all overseas players!^0"); // Kicking OS players is OK foreach (PlayerInfoInterface p in lstPlayers) { if (!Regex.Match(p.CountryCode, "(AU|NZ)", RegexOptions.IgnoreCase).Success) { // Player is non-AU/NZ, so kick plugin.KickPlayerWithMessage(p.Name, "The server is at peak usage kicking Non AU & NZ players, sorry!"); } } return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 18, 2014 Author Share Posted June 18, 2014 Originally Posted by PapaCharlie9*: Nice. Suggestion: move the PRoConChat down below the second test, and maybe add the number of overseas players to the message. In a perfect world I'd make a similar change to the OnJoin limit, but I think it is ok to leave it as is. The important thing is that local players can always join. It's only over seas players who are blocked, possibly earlier than strictly necessary. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 18, 2014 Author Share Posted June 18, 2014 Originally Posted by LCARSx64*: Nice. Suggestion: move the PRoConChat down below the second test, and maybe add the number of overseas players to the message. In a perfect world I'd make a similar change to the OnJoin limit, but I think it is ok to leave it as is. The important thing is that local players can always join. It's only over seas players who are blocked, possibly earlier than strictly necessary. Oops, i forgot all about the PRoConChat, edited the previous post to fix that. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 18, 2014 Author Share Posted June 18, 2014 Originally Posted by bckrv*: Post the limit code you are using for pistols only. Put it in markup. I need to understand why your temp ban isn't sufficient to punish the noobs. It shouldn't matter if a rank 5 shoots everyone up with an assault rifle. They should get banned for doing so, end of problem. EDIT: And stop using 0.0.0.8, that's ancient. Update to 0.9.16.0 please. It works for BF3 also. showthread....0-12-MAR-2014)* Hello Papa,Many thanks for you reply. For the weapons I am using ProconRulz plugin. Here an exemple: Code: On Kill;Weapon DAO-12;PlayerCount 0;Say %p% KICKED for using Forbidden Weapons, Read: !rules ( Pistol only)! %w%;BanSoon, I will change for Insane limits to manage forbidden weapons too. Also, I would like that insane limit kick low noobs ranks before they are starting to play on my server, is possible? Alright I will update the version. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 18, 2014 Author Share Posted June 18, 2014 Originally Posted by LumPenPacK*: Hello Papa and mates, Since BF3 free my server Pistol only server is unplayable, new players with low rank join and start to shoot without read the server rules. Is possible to limit to rank to join my server with Insane Limits, if yes please can you help me? I would like to block low ranks till 1>20. Thanks for your help, regards Add a new limit OnJoin First check expression player.Rank second check code plugin.KickPlayerWithMessage(player.Name, plugin.R("put your message here")); return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 19, 2014 Author Share Posted June 19, 2014 Originally Posted by bckrv*: Good morning, @LumPenPack: Many thanks it works! Have a nice day * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 19, 2014 Author Share Posted June 19, 2014 Originally Posted by LjMjollnir*: Soon, I will change for Insane limits to manage forbidden weapons too.Dont really want to get everyones hopes up yet.. but i have developed a plugin specially for that purpose.. right now you can forbid weapon groups (ie Assault rifles,Carbine,Snipers,Dmrs etc).. Or you can use the advanced mode and single out specific weapons.. (ie RGO grenades, Sw40 pistol, Gol magnum etc)... it currently works for the most part i just need to get around and finish 1 section of code that handles the "None" damage type (Roadkills, Damage Area etc).. and then i will put it up for approval and you'l be able to get it here.. till then if you look around hard enough you might be able to find my proconrulz version of the script.. not sure if i have left it up on any posts but its sometimes around... The Bf Hardline beta has stolen alot of my testers so havent been able to work on it for a few days... but its nearly complete as is. and i have 2 weeks without my family here so ill have plenty of time to finish it up and get it here on the forums.. it will be called "Lj Restrictions" and it has a couple of other addons that work with it that i "might" release... * 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.