ImportBot Posted September 14, 2016 Author Share Posted September 14, 2016 Originally Posted by BuRockK*: Post this in that plugins thread so we can help you tweak it * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 15, 2016 Author Share Posted September 15, 2016 Originally Posted by MrBird*: Hey, I posted a reply here but it didn't show up. I couldn't post in the original examples thread as it has been locked. Here's the link to the post with the voteban example tho: myrcon.net/...insane-limits-examples#entry18607 * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 15, 2016 Author Share Posted September 15, 2016 Originally Posted by maxdralle*: Hey, I posted a reply here but it didn't show up. I couldn't post in the original examples thread as it has been locked. Here's the link to the post with the voteban example tho: myrcon.net/...insane-limits-examples#entry18607voteban its also possible with proconrulz. in this example you will see who initiated the voteban:myrcon.net/.../voteban-function-proconrulz-voteban-for-in-game-chat-admin-protection * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 17, 2016 Author Share Posted September 17, 2016 Originally Posted by lakaelo*: i am searching about some kind of "server playtime announcer" but don´t know if there is any chance to have one. what i mean is, if a player is joining our server than he got a welcome message and i would like to have some message like "player XYZ have player 323 Hours on this server" is something like this possible? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 18, 2016 Author Share Posted September 18, 2016 Originally Posted by Dete96*: i am searching about some kind of "server playtime announcer" but don´t know if there is any chance to have one. what i mean is, if a player is joining our server than he got a welcome message and i would like to have some message like "player XYZ have player 323 Hours on this server" is something like this possible?It is possible with the statslogger plugin. Just see the manual... * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 19, 2016 Author Share Posted September 19, 2016 Originally Posted by cssqw7_3*: Hello, I'm very understanding, this plugin is not I want to know whether this plugin can do some arms limitation I want to use the plug-in use M224 limit server players, including the "VIP" in the server My English is not very good, don't know whether my description is clear, I hope you can help me. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 19, 2016 Author Share Posted September 19, 2016 Originally Posted by Dete96*: Hello, I'm very understanding, this plugin is not I want to know whether this plugin can do some arms limitation I want to use the plug-in use M224 limit server players, including the "VIP" in the server My English is not very good, don't know whether my description is clear, I hope you can help me. Why don't you just use the ProCon rule I gave you a week ago? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 20, 2016 Author Share Posted September 20, 2016 Originally Posted by cssqw7_3*: Why don't you just use the ProCon rule I gave you a week ago?To use ProCon, of course, I was in, but can't use M224 ban "VIP", more misery is due to some relations, we can't deprive these VIP identity, I also want to use ProCon to limit "VIP" the use of some weapons, the same as the ordinary players. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted September 20, 2016 Author Share Posted September 20, 2016 Originally Posted by lakaelo*: It is possible with the statslogger plugin. Just see the manual...ahh..yes, stupid me. lol thanks * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted November 7, 2016 Author Share Posted November 7, 2016 Originally Posted by Pho3niX*: @level here is your ingame KDR / farming limit from 9 till 15 o clock. SETUP LIMIT#1 limit_evaluation: OnKill limit_first_check: Expression limit_first_check_code: paste the CODE#1 here CODE#1 Code: ((DateTime.Now.Hour >= 9) && (DateTime.Now.Hour < 15)) ENABLE SECOND CHECKlimit_second_check: Code limit_second_check_code: paste the CODE#2 here Code#2 Code: // set max intern KDR int maxKDR = 8; // set min kills int minKills = 100; // set max kills befor warn player int warnPlayer = 20; // set max kills to kick/ban int kickPlayer = 30; String kCounter = killer.Name + "_killx_Count"; String kCounterWarn = killer.Name + "_killx_Count_Warn"; int warnings = 0; int showWarnings = 0; if (limit.Activations(killer.Name, TimeSpan.FromSeconds(2)) > 1) return false; if (server.RoundData.issetInt(kCounter)) warnings = server.RoundData.getInt(kCounter); if (server.RoundData.issetInt(kCounterWarn)) showWarnings = server.RoundData.getInt(kCounterWarn); warnings += 1; server.RoundData.setInt(kCounter, warnings); if((player.KillsRound >= minKills) && (player.KdrRound >= maxKDR)) { if ((warnings >= warnPlayer) && (warnings < kickPlayer)) { showWarnings += 1; String globalMessage = killer.Name + " your current round KD is too high (warning " + showWarnings + "/" + (kickPlayer-warnPlayer) + ")"; plugin.SendPlayerMessage(killer.Name, "KILL-FARM-LIMIT: " + globalMessage); plugin.SendPlayerYell(killer.Name, globalMessage, 10); } else if ((warnings >= kickPlayer)) { plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 20, "Banned (20m) for kill farming!"); //plugin.SendGlobalMessage(globalMessage); //plugin.PRoConChat("HeliFarmStop > Say > " + globalMessage); //plugin.KickPlayerWithMessage(killer.Name, "Kicked for kill farming!"); } } return false; Hello maxdrelle, This is a nice and good script what i search for. I already ask this in the development section: showthread....-Kill-Limit-80* Have a question about the first Limit. I want keep it active for the attack helicopter 24/7. Do i must change the 1 limit ((DateTime.Now.Hour >= 9) && (DateTime.Now.Hour And can you modify or fine tune the script more for the Attack Heli K/d 8 and Kill Limit 80 Thank you! #thumbsup * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted November 7, 2016 Author Share Posted November 7, 2016 Originally Posted by maxdralle*: Hello maxdrelle, This is a nice and good script what i search for. I already ask this in the development section: showthread....-Kill-Limit-80* Have a question about the first Limit. I want keep it active for the attack helicopter 24/7. Do i must change the 1 limit ((DateTime.Now.Hour >= 9) && (DateTime.Now.Hour And can you modify or fine tune the script more for the Attack Heli K/d 8 and Kill Limit 80 Thank you! #thumbsup 90% of the kill farmers dont care your warning messages. they join, they farm, thats it. it is a fix part of the map shanghai... use a normal in game kd limit. like this: insane limits, on kill, code Code: ////////////////////////////// // ingame kd farm limit ////////////////////////////// // SETTINGS: // set max intern KDR int maxKDR = 12; // set min kills int minKills = 30; // set max warn messages before kick int warnPlayer = 15; bool useWhitelist = true; // SETTINGS END ////////////////////////////// if(minKills > killer.KillsRound) return false; if (useWhitelist && plugin.isInList(killer.Name, "whitelist_farm_limit")) return false; String kCounterWarn = killer.Name + "_killx_Count_Warn"; int showWarnings = 0; if (server.RoundData.issetInt(kCounterWarn)) showWarnings = server.RoundData.getInt(kCounterWarn); if((killer.KillsRound >= minKills) && (killer.KdrRound > maxKDR)) { showWarnings++; server.RoundData.setInt(kCounterWarn, showWarnings); //if (showWarnings%2 != 1) {return false;} if ((showWarnings <= warnPlayer) ) { String globalMessage = killer.Name + " your current round KD is too high!"; if (showWarnings + 5 >= warnPlayer) {globalMessage = globalMessage + " Change your play style / vehicle";} if (showWarnings == 1) {plugin.PRoConChat("^1^bKILL-FARM-LIMIT:^1^n " + killer.Name + " frist warning - (DEBUG: kdr: " + killer.KdrRound + " k/d: " + killer.KillsRound + "/" + killer.DeathsRound + ")");} plugin.SendPlayerYell(killer.Name, "[KILL-FARM-LIMIT] [WARNING]\n" + globalMessage, 5); plugin.SendPlayerMessage(killer.Name, "KILL-FARM-LIMIT: [WARNING] " + globalMessage + " (max. round KD: " + maxKDR + ")"); //return false; } else { plugin.SendGlobalMessage("KILL-FARM-LIMIT: " + killer.Name + " was KICKED for farming"); plugin.ConsoleWrite("^8^bKILL-FARM-LIMIT:^8^n " + killer.Name + " KICKED for farming. (" + plugin.FriendlyMapName(server.MapFileName) + " - K/D: " + killer.KillsRound + "/" + killer.DeathsRound + " - (DEBUG: kdr: " + killer.KdrRound + " k/d: " + killer.KillsRound + "/" + killer.DeathsRound + ")"); plugin.PRoConChat("^8^bKILL-FARM-LIMIT:^8^n " + killer.Name + " KICKED for farming. (" + plugin.FriendlyMapName(server.MapFileName) + " - K/D: " + killer.KillsRound + "/" + killer.DeathsRound + " - (DEBUG: kdr: " + killer.KdrRound + " k/d: " + killer.KillsRound + "/" + killer.DeathsRound + ")"); plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 180, killer.Name + " > TIME BAN (3 hours) for kill farming! (K/D: " + killer.KillsRound + "/" + killer.DeathsRound + ")"); } } * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted November 7, 2016 Author Share Posted November 7, 2016 Originally Posted by Pho3niX*: Totaly agree with you. There dont care about and think only on 1 thing. How does this script work for the attack Heli? Why i am asking this this is based on KDR, but we also use 80 kill limit. Is this KDR global for all players? Normaly you must set the weapon key (vehicleair) Can you also set Kill-Limit 80 in the script? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 15, 2017 Author Share Posted January 15, 2017 Originally Posted by Gazovik83*: Hello world! Tell me is there any possibility to block a specific player to use certain weapons? for example: Ivan m320 cannot be used, and if he uses his kill. And if uses three times his kick from the server * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 16, 2017 Author Share Posted January 16, 2017 Originally Posted by LCARSx64*: Hello world! Tell me is there any possibility to block a specific player to use certain weapons? for example: Ivan m320 cannot be used, and if he uses his kill. And if uses three times his kick from the server Change the red text to the player's in-game name: Weapon Limit on Specific player Create a new limit to evaluate OnKill. Set action to None. Set first_check to this Code: Code: // Weapon Limit on Specific player // v1.0 - OnKill - Limit 1 of 1 // String sPlayer = "[b]Ivan[/b]"; // String sWeap = kill.Weapon; String sKey = "_WLSP_"; String sMsg = "You are not allowed to use M320 launchers!"; int iCount = 0; if (player.Name == sPlayer && (sWeap.Contains("_M320_") || sWeap == "U_MGL")) { if (server.Data.issetInt(sKey)) iCount = server.Data.getInt(sKey); iCount++; if (iCount < 3) { plugin.SendPlayerYell(player.Name, "\n" + sMsg, 8); plugin.SendPlayerMessage(player.Name, sMsg); plugin.KillPlayer(player.Name); } else { plugin.KickPlayerWithMessage(player.Name, sMsg + "No more warnings!"); iCount = 2; } server.Data.setInt(sKey, iCount); } return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 16, 2017 Author Share Posted January 16, 2017 Originally Posted by SmackDown*: How could I use this code to stop multiple player from using certain weapons? Would for example, I just add a" , " after Ivan and then add new players name? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 16, 2017 Author Share Posted January 16, 2017 Originally Posted by IceCold*: Hello world! Tell me is there any possibility to block a specific player to use certain weapons? for example: Ivan m320 cannot be used, and if he uses his kill. And if uses three times his kick from the server why would you want rules for one person only ?a bit unfair ? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 17, 2017 Author Share Posted January 17, 2017 Originally Posted by LCARSx64*: How could I use this code to stop multiple player from using certain weapons? Would for example, I just add a" , " after Ivan and then add new players name?Change the code to the following (for the additional players, look at the red highlighted code):Code: // Weapon Limit on Specific player // v2.0 - OnKill - Limit 1 of 1 // List<String> sPlayers = new List<String>(); [b]// Add as many sPlayers.Add("PLAYER_NAME"); lines as required. sPlayers.Add("Ivan"); sPlayers.Add("Player2");[/b] // String sWeap = kill.Weapon; String sKey = "_WLSP_" + player.Name; String sMsg = "You are not allowed to use M320 launchers!"; int iCount = 0; if (sPlayers.Count > 0) { if (sPlayers.Contains(player.Name) && (sWeap.Contains("_M320_") || sWeap == "U_MGL")) { if (server.Data.issetInt(sKey)) iCount = server.Data.getInt(sKey); iCount++; if (iCount < 3) { plugin.SendPlayerYell(player.Name, "\n" + sMsg, 8); plugin.SendPlayerMessage(player.Name, sMsg); plugin.KillPlayer(player.Name); } else { plugin.KickPlayerWithMessage(player.Name, sMsg + "No more warnings!"); iCount = 2; } server.Data.setInt(sKey, iCount); } } return false; why would you want rules for one person only ? a bit unfair ? I agree it is unfair however, I am here to supply requested code, not to judge. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 17, 2017 Author Share Posted January 17, 2017 Originally Posted by Hodor*: I am here to supply requested code, not to judge.I agree, it will all on a server administrator conscience. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 18, 2017 Author Share Posted January 18, 2017 Originally Posted by Gazovik83*: Change the code to the following (for the additional players, look at the red highlighted code): Code: // Weapon Limit on Specific player // v2.0 - OnKill - Limit 1 of 1 // List<String> sPlayers = new List<String>(); [b]// Add as many sPlayers.Add("PLAYER_NAME"); lines as required. sPlayers.Add("Ivan"); sPlayers.Add("Player2");[/b] // String sWeap = kill.Weapon; String sKey = "_WLSP_" + player.Name; String sMsg = "You are not allowed to use M320 launchers!"; int iCount = 0; if (sPlayers.Count > 0) { if (sPlayers.Contains(player.Name) && (sWeap.Contains("_M320_") || sWeap == "U_MGL")) { if (server.Data.issetInt(sKey)) iCount = server.Data.getInt(sKey); iCount++; if (iCount < 3) { plugin.SendPlayerYell(player.Name, "\n" + sMsg, 8); plugin.SendPlayerMessage(player.Name, sMsg); plugin.KillPlayer(player.Name); } else { plugin.KickPlayerWithMessage(player.Name, sMsg + "No more warnings!"); iCount = 2; } server.Data.setInt(sKey, iCount); } } return false;I agree it is unfair however, I am here to supply requested code, not to judge.Thanks for the code! How to add other weapons? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 18, 2017 Author Share Posted January 18, 2017 Originally Posted by Hodor*: Thanks for the code! How to add other weapons?Use proconrulz if it is difficult to you to understand Insane Limits * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 18, 2017 Author Share Posted January 18, 2017 Originally Posted by Gazovik83*: Use proconrulz if it is difficult to you to understand Insane LimitsRead the title of the topic! If you don't know the answer then give another answer! And I decide that I use! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 18, 2017 Author Share Posted January 18, 2017 Originally Posted by LCARSx64*: Thanks for the code! How to add other weapons?You will need to use the weapon codes found in the BF4.def file or ...*.The codes are entered as: Code: WEAPCODE1|WEAPCODE2|WEAPCODE3|ETC.Enter these codes in the the red highlighted part of the following code.Don't forget to change the player message highlighted in green. Code: // Weapon Limit on Specific player // v2.0 - OnKill - Limit 1 of 1 // // Example limiting Defibs and Phantom Bow. String sWeaps = @"([b]U_Defib|dlSHTR[/b])"; List<String> sPlayers = new List<String>(); // Add as many sPlayers.Add("PLAYER_NAME"); lines as required. sPlayers.Add("Ivan"); sPlayers.Add("Player2"); // String sWeap = kill.Weapon; String sKey = "_WLSP_" + player.Name; String sMsg = "[b]You are not allowed to use M320 launchers, Defibs or Phantom Bow![/b]"; int iCount = 0; if (sPlayers.Count > 0) { if (sPlayers.Contains(player.Name) && (sWeap.Contains("_M320_") || sWeap == "U_MGL" || Regex.Match(kill.Weapon, sWeaps).Success)) { if (server.Data.issetInt(sKey)) iCount = server.Data.getInt(sKey); iCount++; if (iCount < 3) { plugin.SendPlayerYell(player.Name, "\n" + sMsg, 8); plugin.SendPlayerMessage(player.Name, sMsg); plugin.KillPlayer(player.Name); } else { plugin.KickPlayerWithMessage(player.Name, sMsg + "No more warnings!"); iCount = 2; } server.Data.setInt(sKey, iCount); } } return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 18, 2017 Author Share Posted January 18, 2017 Originally Posted by Gazovik83*: You will need to use the weapon codes found in the BF4.def file or ...*. The codes are entered as: Code: WEAPCODE1|WEAPCODE2|WEAPCODE3|ETC.Enter these codes in the the red highlighted part of the following code.Don't forget to change the player message highlighted in green. Code: // Weapon Limit on Specific player // v2.0 - OnKill - Limit 1 of 1 // // Example limiting Defibs and Phantom Bow. String sWeaps = @"([b]U_Defib|dlSHTR[/b])"; List<String> sPlayers = new List<String>(); // Add as many sPlayers.Add("PLAYER_NAME"); lines as required. sPlayers.Add("Ivan"); sPlayers.Add("Player2"); // String sWeap = kill.Weapon; String sKey = "_WLSP_" + player.Name; String sMsg = "[b]You are not allowed to use M320 launchers, Defibs or Phantom Bow![/b]"; int iCount = 0; if (sPlayers.Count > 0) { if (sPlayers.Contains(player.Name) && (sWeap.Contains("_M320_") || sWeap == "[b]U_CZ805_M320_3GL|U_M16A4_M320_HE|U_M16A4_M320_3GL[/b]" || Regex.Match(kill.Weapon, sWeaps).Success)) { if (server.Data.issetInt(sKey)) iCount = server.Data.getInt(sKey); iCount++; if (iCount < 3) { plugin.SendPlayerYell(player.Name, "\n" + sMsg, 8); plugin.SendPlayerMessage(player.Name, sMsg); plugin.KillPlayer(player.Name); } else { plugin.KickPlayerWithMessage(player.Name, sMsg + "No more warnings!"); iCount = 2; } server.Data.setInt(sKey, iCount); } } return false; I respect the syntax right?red highlighted Code: ... if (sPlayers.Contains(player.Name) && (sWeap.Contains("[b]_M320_HE|_M320_3GL|_M320_LVG[/b]") || sWeap == "[b]U_CZ805_M320_3GL|U_M16A4_M320_HE|U_M16A4_M320_3GL[/b]" || Regex.Match(kill.Weapon, sWeaps).Success)) ... * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 18, 2017 Author Share Posted January 18, 2017 Originally Posted by LCARSx64*: I respect the syntax right? red highlighted Code: ... if (sPlayers.Contains(player.Name) && (sWeap.Contains("[b]_M320_HE|_M320_3GL|_M320_LVG[/b]") || sWeap == "[b]U_CZ805_M320_3GL|U_M16A4_M320_HE|U_M16A4_M320_3GL[/b]" || Regex.Match(kill.Weapon, sWeaps).Success)) ... This is incorrect. That line should be:Code: if (sPlayers.Contains(player.Name) && (sWeap.Contains("_M320_") || sWeap == "U_MGL" || Regex.Match(kill.Weapon, sWeaps).Success))This ensures that the M320 launcher attached to any weapon is not permitted.To add any extra weapon limits (Defib and Phantom Bow as an example in the code), you need to change the line I highlighted in red in my previous post. Code: String sWeaps = @"(U_Defib|dlSHTR)";For example, if you wanted to limit the EOD Bot, you'd change that line to:Code: String sWeaps = @"(U_EODBot|EODBot)";If you wanted to limit Defib, Phantom Bow and EOD bot, you'd change it to:Code: String sWeaps = @"(U_Defib|dlSHTR|U_EODBot|EODBot)"; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 18, 2017 Author Share Posted January 18, 2017 Originally Posted by Gazovik83*: This is incorrect. That line should be: Code: if (sPlayers.Contains(player.Name) && (sWeap.Contains("_M320_") || sWeap == "U_MGL" || Regex.Match(kill.Weapon, sWeaps).Success))This ensures that the M320 launcher attached to any weapon is not permitted.To add any extra weapon limits (Defib and Phantom Bow as an example in the code), you need to change the line I highlighted in red in my previous post. Code: String sWeaps = @"(U_Defib|dlSHTR)";For example, if you wanted to limit the EOD Bot, you'd change that line to:Code: String sWeaps = @"(U_EODBot|EODBot)";If you wanted to limit Defib, Phantom Bow and EOD bot, you'd change it to:Code: String sWeaps = @"(U_Defib|dlSHTR|U_EODBot|EODBot)"; We have agreed to limit not all m320, only M320_HE, M320_3GL, M320_LVG And weird but this code works))) However, does not reset the counter to 0 after kicking from the server Code: // Weapon Limit on Specific player // v2.0 - OnKill - Limit 1 of 1 // // Example limiting Defibs and Phantom Bow. String sWeaps = @"(U_FAMAS|U_AEK971_M320_HE|U_AEK971_M320_3GL|U_AK12_M320_HE|U_AK12_M320_3GL|U_CZ805_M320_HE|U_CZ805_M320_3GL|U_M16A4_M320_HE|U_M16A4_M320_3GL|U_M416_M320_HE|U_M416_M320_3GL|U_QBZ951_M320_HE|U_QBZ951_M320_3GL|U_SAR21_M320_HE|U_SAR21_M320_3GL|U_SCAR-H_M320_HE|U_SCAR-H_M320_3GL|U_SteyrAug_M320_HE|U_SteyrAug_M320_3GL|U_L85a2_M320_HE_V2|U_L85a2_M320_3GL_V2|U_AR160_M320_HE|U_AR160_M320_3GL|U_M320_HE|U_M320_3GL|U_M320_LVG|U_AEK971_M320_LVG|U_AK12_M320_LVG|U_CZ805_M320_LVG|U_M16A4_M320_LVG|U_M416_M320_LVG|U_QBZ951_M320_LVG|U_SAR21_M320_LVG|U_SCAR-H_M320_LVG|U_SteyrAug_M320_LVG|U_L85a2_M320_LVG_V2|U_AR160_M320_LVG)"; List<String> sPlayers = new List<String>(); // Add as many sPlayers.Add("PLAYER_NAME"); lines as required. sPlayers.Add("sangangstar"); //sPlayers.Add("lllGAZGAZlll"); // String sWeap = kill.Weapon; String sKey = "_WLSP_" + player.Name; String sMsg = "You are not allowed to use M320 launchers, Defibs or Phantom Bow!"; int iCount = 0; if (sPlayers.Count > 0) { if (sPlayers.Contains(player.Name) && (sWeap.Contains("_M320_HE|_M320_3GL|_M320_LVG") || sWeap == "U_FAMAS" || Regex.Match(kill.Weapon, sWeaps).Success)) { if (server.Data.issetInt(sKey)) iCount = server.Data.getInt(sKey); iCount++; if (iCount < 3) { plugin.SendPlayerYell(player.Name, "\n" + sMsg, 8); plugin.SendPlayerMessage(player.Name, sMsg); plugin.KillPlayer(player.Name); } else { plugin.KickPlayerWithMessage(player.Name, sMsg + "No more warnings!"); iCount = 2; } server.Data.setInt(sKey, iCount); } } return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 19, 2017 Author Share Posted January 19, 2017 Originally Posted by LCARSx64*: We have agreed to limit not all m320, only M320_HE, M320_3GL, M320_LVG And weird but this code works))) However, does not reset the counter to 0 after kicking from the server Code: // Weapon Limit on Specific player // v2.0 - OnKill - Limit 1 of 1 // // Example limiting Defibs and Phantom Bow. String sWeaps = @"(U_FAMAS|U_AEK971_M320_HE|U_AEK971_M320_3GL|U_AK12_M320_HE|U_AK12_M320_3GL|U_CZ805_M320_HE|U_CZ805_M320_3GL|U_M16A4_M320_HE|U_M16A4_M320_3GL|U_M416_M320_HE|U_M416_M320_3GL|U_QBZ951_M320_HE|U_QBZ951_M320_3GL|U_SAR21_M320_HE|U_SAR21_M320_3GL|U_SCAR-H_M320_HE|U_SCAR-H_M320_3GL|U_SteyrAug_M320_HE|U_SteyrAug_M320_3GL|U_L85a2_M320_HE_V2|U_L85a2_M320_3GL_V2|U_AR160_M320_HE|U_AR160_M320_3GL|U_M320_HE|U_M320_3GL|U_M320_LVG|U_AEK971_M320_LVG|U_AK12_M320_LVG|U_CZ805_M320_LVG|U_M16A4_M320_LVG|U_M416_M320_LVG|U_QBZ951_M320_LVG|U_SAR21_M320_LVG|U_SCAR-H_M320_LVG|U_SteyrAug_M320_LVG|U_L85a2_M320_LVG_V2|U_AR160_M320_LVG)"; List<String> sPlayers = new List<String>(); // Add as many sPlayers.Add("PLAYER_NAME"); lines as required. sPlayers.Add("sangangstar"); //sPlayers.Add("lllGAZGAZlll"); // String sWeap = kill.Weapon; String sKey = "_WLSP_" + player.Name; String sMsg = "You are not allowed to use M320 launchers, Defibs or Phantom Bow!"; int iCount = 0; if (sPlayers.Count > 0) { if (sPlayers.Contains(player.Name) && (sWeap.Contains("_M320_HE|_M320_3GL|_M320_LVG") || sWeap == "U_FAMAS" || Regex.Match(kill.Weapon, sWeaps).Success)) { if (server.Data.issetInt(sKey)) iCount = server.Data.getInt(sKey); iCount++; if (iCount < 3) { plugin.SendPlayerYell(player.Name, "\n" + sMsg, 8); plugin.SendPlayerMessage(player.Name, sMsg); plugin.KillPlayer(player.Name); } else { plugin.KickPlayerWithMessage(player.Name, sMsg + "No more warnings!"); iCount = 2; } server.Data.setInt(sKey, iCount); } } return false; It is working because the kill.Weapon does not contain the exact string "_M320_HE|_M320_3GL|_M320_LVG".Instead, use this code (Make sure to change the string highlighted in green to give a proper reason message): Code: // Weapon Limit on Specific player // v2.0 - OnKill - Limit 1 of 1 // // Example limiting Defibs and Phantom Bow. String sWeaps = @"(U_FAMAS|U_AEK971_M320_HE|U_AEK971_M320_3GL|U_AK12_M320_HE|U_AK12_M320_3GL|U_CZ805_M320_HE|U_CZ805_M320_3GL|U_M16A4_M320_HE|U_M16A4_M320_3GL|U_M416_M320_HE|U_M416_M320_3GL|U_QBZ951_M320_HE|U_QBZ951_M320_3GL|U_SAR21_M320_HE|U_SAR21_M320_3GL|U_SCAR-H_M320_HE|U_SCAR-H_M320_3GL|U_SteyrAug_M320_HE|U_SteyrAug_M320_3GL|U_L85a2_M320_HE_V2|U_L85a2_M320_3GL_V2|U_AR160_M320_HE|U_AR160_M320_3GL|U_M320_HE|U_M320_3GL|U_M320_LVG|U_AEK971_M320_LVG|U_AK12_M320_LVG|U_CZ805_M320_LVG|U_M16A4_M320_LVG|U_M416_M320_LVG|U_QBZ951_M320_LVG|U_SAR21_M320_LVG|U_SCAR-H_M320_LVG|U_SteyrAug_M320_LVG|U_L85a2_M320_LVG_V2|U_AR160_M320_LVG)";List<String> sPlayers = new List<String>(); // Add as many sPlayers.Add("PLAYER_NAME"); lines as required. sPlayers.Add("sangangstar"); // String sKey = "_WLSP_" + player.Name; String sMsg = "[b]You are not allowed to use M320 launchers, Defibs or Phantom Bow![/b]"; int iCount = 0; if (sPlayers.Count > 0) { if (sPlayers.Contains(player.Name) && Regex.Match(kill.Weapon, sWeaps).Success) { if (server.Data.issetInt(sKey)) iCount = server.Data.getInt(sKey); iCount++; if (iCount < 3) { plugin.SendPlayerYell(player.Name, "\n" + sMsg, 8); plugin.SendPlayerMessage(player.Name, sMsg); plugin.KillPlayer(player.Name); } else { plugin.KickPlayerWithMessage(player.Name, sMsg + "No more warnings!"); iCount = 2; } server.Data.setInt(sKey, iCount); } } return false;The code is designed to remember that the player has already been given 3 warnings (2 kills and a kick) so that any additional breaches are instant kick. If you want it to reset then change:Code: iCount = 2;to:Code: iCount = 0; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted January 19, 2017 Author Share Posted January 19, 2017 Originally Posted by Gazovik83*: It is working because the kill.Weapon does not contain the exact string "_M320_HE|_M320_3GL|_M320_LVG". Instead, use this code (Make sure to change the string highlighted in green to give a proper reason message): Code: // Weapon Limit on Specific player // v2.0 - OnKill - Limit 1 of 1 // // Example limiting Defibs and Phantom Bow. String sWeaps = @"(U_FAMAS|U_AEK971_M320_HE|U_AEK971_M320_3GL|U_AK12_M320_HE|U_AK12_M320_3GL|U_CZ805_M320_HE|U_CZ805_M320_3GL|U_M16A4_M320_HE|U_M16A4_M320_3GL|U_M416_M320_HE|U_M416_M320_3GL|U_QBZ951_M320_HE|U_QBZ951_M320_3GL|U_SAR21_M320_HE|U_SAR21_M320_3GL|U_SCAR-H_M320_HE|U_SCAR-H_M320_3GL|U_SteyrAug_M320_HE|U_SteyrAug_M320_3GL|U_L85a2_M320_HE_V2|U_L85a2_M320_3GL_V2|U_AR160_M320_HE|U_AR160_M320_3GL|U_M320_HE|U_M320_3GL|U_M320_LVG|U_AEK971_M320_LVG|U_AK12_M320_LVG|U_CZ805_M320_LVG|U_M16A4_M320_LVG|U_M416_M320_LVG|U_QBZ951_M320_LVG|U_SAR21_M320_LVG|U_SCAR-H_M320_LVG|U_SteyrAug_M320_LVG|U_L85a2_M320_LVG_V2|U_AR160_M320_LVG)";List<String> sPlayers = new List<String>(); // Add as many sPlayers.Add("PLAYER_NAME"); lines as required. sPlayers.Add("sangangstar"); // String sKey = "_WLSP_" + player.Name; String sMsg = "[b]You are not allowed to use M320 launchers, Defibs or Phantom Bow![/b]"; int iCount = 0; if (sPlayers.Count > 0) { if (sPlayers.Contains(player.Name) && Regex.Match(kill.Weapon, sWeaps).Success) { if (server.Data.issetInt(sKey)) iCount = server.Data.getInt(sKey); iCount++; if (iCount < 3) { plugin.SendPlayerYell(player.Name, "\n" + sMsg, 8); plugin.SendPlayerMessage(player.Name, sMsg); plugin.KillPlayer(player.Name); } else { plugin.KickPlayerWithMessage(player.Name, sMsg + "No more warnings!"); iCount = 2; } server.Data.setInt(sKey, iCount); } } return false;The code is designed to remember that the player has already been given 3 warnings (2 kills and a kick) so that any additional breaches are instant kick. If you want it to reset then change:Code: iCount = 2;to:Code: iCount = 0; Thank you so much for your help! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 1, 2017 Author Share Posted February 1, 2017 Originally Posted by spatieman*: PC9 , you remember this thread? myrcon.net/...insane-limits-examples#entry18540 I am using IL 0.9.17.0 Code: double highKdr = 6.0; double highSpm = 800; if ( player.KdrRound > highKdr && player.Kdr > highKdr && player.Spm > highSpm ) { String reason = "in-round KDR=" + player.KdrRound + " exceeds server limit of " + highKdr + "!"; String message = plugin.R("Banning %p_fn% for ") + reason; plugin.SendGlobalMessage(message); plugin.ConsoleWrite(@"^4 " + message + @" ^0 (Battlelog KDR=" + player.Kdr + ", SPM=" + player.Spm + " > " + highSpm + ")"); plugin.PBBanPlayerWithMessage(PBBanDuration.Permanent, player.Name, 0, reason); } return false;But for some reason i get compile errors on it. Code: [19:49:58 24] [Insane Limits] ERROR: 4 errors compiling Expression [19:49:58 24] [Insane Limits] ERROR: (CS1026, line: 42, column: 30): ) is aspected [19:49:58 24] [Insane Limits] ERROR: (CS1525, line: 52, column: 18): invalid expresion term ) [19:49:58 24] [Insane Limits] ERROR: (CS1002, line: 52, column: 27): ; is aspected [19:49:58 24] [Insane Limits] ERROR: (CS1525, line: 52, column: 27): invalid expression term ) [19:50:47 40] [Insane Limits] Compiling Limit #6 - Ban High In-Round KDR Killer - OnSpawn(sorry wrong translation,if any) or is the code only for previous versions nvr mind,, found it * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 4, 2017 Author Share Posted February 4, 2017 Originally Posted by spatieman*: 2 questions.. 1: is there a RTFM for learning to proper code in insane limits ? 2: Is insane limits able to read a proconrulz.ini file for fetching stuff what is written in it to work with? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 6, 2017 Author Share Posted February 6, 2017 Originally Posted by LCARSx64*: 2 questions.. 1: is there a RTFM for learning to proper code in insane limits ? 2: Is insane limits able to read a proconrulz.ini file for fetching stuff what is written in it to work with? Limits for insane limits are written in C# so I would suggest learning that language. Just google for C# Tutorials for beginners, here is one such tutorial: You can read the proconrulz.ini file in from Insane Limits code but it won't understand the rulz, you're better off either just using ProconRulz or manually translating the rulz to Insane Limits. * 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.