ImportBot Posted March 13, 2014 Share Posted March 13, 2014 Originally Posted by PapaCharlie9*: Hi Papa. Im sure you probably already plan on making a limit for the MAA now that the vehicle codes are available, but I'll make the request here for you to make it when you're ready. I would appreciate a limit that will prohibit the Mobile-AA and this new Anti-Air mine please. I would like it to work like this: First Kill Violation Violation kill count does not reset on new round/map and keeps accumulating (until ProCon restarts) Any first kill with the Mobile-AA = Auto KILL with a public message in chat and a private yell to the player Any first kill with the AA-mine = Auto KILL with a public message in chat and a private yell to the player Public message in chat for the respective violation: PlayerName AUTO-KILLED for using the PROHIBITED Mobile-AA PlayerName AUTO-KILLED for using the PROHIBITED Anti-Air Mine Private yell for 20 seconds to the player for the respective violation: The Mobile-AA is prohibited. You will be AUTO-KICKED if you use it again. The AA-Mine is prohibited. You will be AUTO-KICKED if you use it again. Second Kill Violation Any second kill with the Mobile-AA = Auto KICK with Kick Reason to the player and same kick reason shown in public chat Any second kill with the AA-mine = Auto KICK with Kick Reason to the player and same kick reason shown in public chat Kick Reason shown in both public chat and provided as the kick reason to the player for the respective violation: PlayerName AUTO-KICKED for using the PROHIBITED Mobile-AA PlayerName AUTO-KICKED for using the PROHIBITED Anti-Air Mine Third or greater Kill (running count until ProCon restarts) Any third or greater kill with the Mobile-AA = Auto 1 HR TEMP BAN with Reason to the player and same reason shown in public chat Any third or greater kill with the AA-mine = Auto 1 HR TEMP BAN with Reason to the player and same reason shown in public chat Temp Ban Reason shown in both public chat and provided to the player for the respective violation: PlayerName TEMP BAN 1 HOUR for using the PROHIBITED Mobile-AA PlayerName TEMP BAN 1 HOUR for using the PROHIBITED Anti-Air Mine Please also add as part of a second limit the messages shown below. 1. The following private chat and private yell are sent at 2 seconds after the player first reaches the deploy screen (before he spawns), but it is sent just one time during his total play session and only on his very first deploy screen (not beyond the first map): (This is similar to the way Adaptive Server Size sends the welcome message as soon as the player reaches the deploy screen.) Private Chat Message: WARNING: You will be AUTO-KICKED if you use the PROHIBITED Mobile-AA or AA-Mine! Private Yell for 20 seconds (has different formatting with extra spaces after the words "AUTO-KICKED" to center the message nicely): Code: [b]WARNING: You will be AUTO-KICKED if you use the PROHIBITED Mobile-AA or AA-Mine![/b] .2. The following two private chat messages are sent 30 seconds after the player first spawns, but they are sent just one time during his session and only after his very first spawn (not beyond the first map): . WARNING: You will be AUTO-KICKED if you use the PROHIBITED Mobile-AA or AA-Mine! . Please type @rules in chat to see the Server Rules. . For the first limit, I wasn't clear on whether the Mobile AA count and the AA Mine count were supposed to be treated separately or combined. To have separate counts would make the code confusing, unless the limit was split into separate Mobile AA and AA Mine limits. Rather than double the limit, I combined the counts below, which means a player may be killed for first Mobile AA use, then use an AA Mine for the first time and get kicked. If that's not acceptable, I'll have to make two separate OnKill limits in a follow-up post. For the second limit, I'm not able to do exactly what you requested. Insane Limits is not able to insure that a message appears during the first deployment screen, let alone some amount of time after a spawn. A full-blown plugin can do that, but Insane Limits is more limited, mostly due to the whole stats-fetching delay thing during initial join. So instead what I have done is just count the number of spawns. That is always reliable. The first notice (what you wanted on the deployment screen) is sent on first spawn, and the second notice is sent on some later spawn count of your choice. The code below is set to the third spawn, but you can change that by changing secondNoticeSpawnCount. Both of these limits require Procon 1.4.2.1 or later and Insane Limits 0.9.16.0 or later. First, here's the first limit, as requested. Create a new limit to evaluate OnKill, call it "Prohibit AA", leave Action set to None. Set first_check to this Code: Code: /* Version 9.16/R1b */ /* SETUP */ // 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 // Prohibited weapon/vehicle String mobileAA = "Mobile-AA"; String aaMine = "AA-Mine"; // Weapon/vehicle codes bool isAAMine = (kill.Weapon == "AA Mine"); bool isMAA = Regex.Match(kill.Weapon, @"(LAV_AD|Tunguska|PGZ-95)").Success; /* CODE */ if (!isAAMine && !isMAA) return false; String prohibited = (isMAA) _ mobileAA : aaMine; String key = "PersistAA_" + killer.Name; 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); int count = 0; if (plugin.Data.issetInt(key)) count = plugin.Data.getInt(key); 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; Create a second limit to evaluate OnSpawn, call it "AA Notices", leave Action set to None. Set first_check to this Code: Code: /* Version 9.16/R1a */ /* SETUP */ // Messages String msg = "WARNING: You will be AUTO-KICKED if you use the PROHIBITED Mobile-AA or AA-Mine!"; String yellMsg = @"WARNING: You will be AUTO-KICKED if you use the PROHIBITED Mobile-AA or AA-Mine!"; String msg1 = "WARNING: You will be AUTO-KICKED if you use the PROHIBITED Mobile-AA or AA-Mine!"; String msg2 = "Please type @rules in chat to see the Server Rules."; // Times int yellTime = 20; // seconds int secondNoticeSpawnCount = 3; /* CODE */ String key = "WelcomeRulesAA_" + player.Name; int count = 0; if (player.Data.issetInt(key)) count = player.Data.getInt(key); count = count + 1; if (count == 1) { // First notice plugin.SendPlayerMessage(player.Name, msg); plugin.SendPlayerYell(player.Name, yellMsg, yellTime); } else if (count == secondNoticeSpawnCount) { // Second notice plugin.SendPlayerMessage(player.Name, msg1); plugin.SendPlayerMessage(player.Name, msg2); } player.Data.setInt(key, count); return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 13, 2014 Author Share Posted March 13, 2014 Originally Posted by IAF-SDS*: Thanks Papa for creating this. I tried this part of the second limit, and it did not give me any chat or yell on first spawn (nor on third spawn) on a consistent basis. I get it one time, but if I quit and come back later, I don't get the messages. Also, it looks like you missed this part from the First Kill Violation section: Private yell for 20 seconds to the player for the respective violation (see context above): The Mobile-AA is prohibited. You will be AUTO-KICKED if you use it again. The AA-Mine is prohibited. You will be AUTO-KICKED if you use it again. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 14, 2014 Author Share Posted March 14, 2014 Originally Posted by PapaCharlie9*: I decided to split the first limit into two separate limits, so that AA Mine and MAA are counted separately. Both of these limits require Procon 1.4.2.1 or later and Insane Limits 0.9.16.0 or later. AA Mine Create a new limit to evaluate OnKill, call it "Prohibit AA Mine", leave Action set to None. Set first_check to this Code: Code: /* Version 9.16/R4 */ /* SETUP */ // 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 isAAMine = (kill.Weapon == "AA Mine"); /* CODE */ if (!isAAMine) return false; String prohibited = "AA-Mine"; String key = "PersistAA_" + prohibited + "_" + killer.Name; 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); int count = 0; if (plugin.Data.issetInt(key)) count = plugin.Data.getInt(key); 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; Mobile AA Create a new limit to evaluate OnKill, call it "Prohibit Mobile AA", leave Action set to None. Set first_check to this Code: Code: /* Version 9.16/R4 */ /* SETUP */ // 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 isMAA = Regex.Match(kill.Weapon, @"(LAV_AD|Tunguska|PGZ-95)").Success; /* CODE */ if (!isMAA) return false; String prohibited = "Mobile-AA"; String key = "PersistAA_" + 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; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 14, 2014 Author Share Posted March 14, 2014 Originally Posted by PapaCharlie9*: The second limit in post #1 has been updated so that when a player leaves, the counter is reset, so that they will see the messages again if they rejoin. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 15, 2014 Author Share Posted March 15, 2014 Originally Posted by PapaCharlie9*: Added yellKilled message to all versions of limit "#1". * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 15, 2014 Author Share Posted March 15, 2014 Originally Posted by IAF-SDS*: Awesome. Thank you again Papa! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 15, 2014 Author Share Posted March 15, 2014 Originally Posted by PapaCharlie9*: Added multiKillTime window of 5 seconds (you can change it), so that if a single MAA or AA Mine attack kills multiple enemy players (like pilot and gunner in a chopper) at the same time, that's only counted as one for the purposes of warnings, kills and kicks. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 16, 2014 Author Share Posted March 16, 2014 Originally Posted by IAF-SDS*: Thank you Papa. For reference, below are the requests we previously discussed: 1) Please tweak it so that if you kill multiple people within say 5 seconds, it only counts as one for purposes of the punishment to kill versus kick or temp ban. This becomes an issue when the MAA takes out a chopper that has two or more players in it. #1) Multiple kills in 5 seconds is easy, I will add that to both versions. 2) I don't know how easy or difficult this may be, but do you think it is possible to add something that will punish the player who fired the two AA-mines first and then used his stinger or igla to finish off the heli within a few seconds from first firing the AA-mines (this is done as a means to circumvent the AA-mine limit)? This is an example of what I mean with two AA-Mines plus stinger combo for one player: http://www.youtube.com/watch_v=MzKSV27QjMs #2) MAA followed by AA missiles, sorry, I can't think of a way to do that. I'm not saying it is not possible, it's just not obvious to me how to code it. I'll have to think about it. It might turn out to be infeasible, so no promises. 3) Please add MAA roadkills to the limit. #3) Roadkill for MAA only -- unfortunately, this is not possible. Procon doesn't know what vehicle caused a road kill, so unless you want to punish road kills by all vehicles, this can't be done. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 16, 2014 Author Share Posted March 16, 2014 Originally Posted by TMiland*: Nice! :-) *Edit Is it possible to allow to kill only certain vehicles? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 16, 2014 Author Share Posted March 16, 2014 Originally Posted by PapaCharlie9*: Detecting specific kill sequences, like Stinger after an AA Mine or MAA kill, could be tricky. I haven't been able to think up a way to do that reliably. I suspect it's not feasible. It's not possible to distinguish which vehicle did a roadkill, so a punishment for roadkills will apply to all vehicles. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 17, 2014 Author Share Posted March 17, 2014 Originally Posted by TMiland*: Detecting specific kill sequences, like Stinger after an AA Mine or MAA kill, could be tricky. I haven't been able to think up a way to do that reliably. I suspect it's not feasible. It's not possible to distinguish which vehicle did a roadkill, so a punishment for roadkills will apply to all vehicles. Okay, i was thinking to allow the MAA to shoot down the Gunship only, as this is impossible to get down if you don't have any jet pilots around. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 17, 2014 Author Share Posted March 17, 2014 Originally Posted by ColColonCleaner*: Okay, i was thinking to allow the MAA to shoot down the Gunship only, as this is impossible to get down if you don't have any jet pilots around. You can't tell what vehicle is killed by the AA. Well....you can, but it's indirect. We can log which vehicle everyone got their last kill with, and only let the MAA get kills on players whose last kill was using the gunship. Obviously you get a multikill when killing a full gunship so you would need to have something that combines the last kills of the group killed to see if it actually was the gunship. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 17, 2014 Author Share Posted March 17, 2014 Originally Posted by TMiland*: You can't tell what vehicle is killed by the AA. Well....you can, but it's indirect. We can log which vehicle everyone got their last kill with, and only let the MAA get kills on players whose last kill was using the gunship. Obviously you get a multikill when killing a full gunship so you would need to have something that combines the last kills of the group killed to see if it actually was the gunship. Okay, i understand. Sounds complicated! *edit Btw, this limit made players go nuts about how wrong it is to limit the game, BUT for some of the players, it was most welcome! I actually flew a chopper for more than 10 seconds yesterday, and i haven't been able to do that since BF3(!!) * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 2, 2014 Author Share Posted April 2, 2014 Originally Posted by TMiland*: I have tested this limit, to prohibit the use of Gunship *Edit Moved to own thread: showthread....ohibit-Gunship* I have this limit running with the rest of the limits in first post. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 3, 2014 Author Share Posted April 3, 2014 Originally Posted by ColColonCleaner*: Okay, i understand. Sounds complicated! *edit Btw, this limit made players go nuts about how wrong it is to limit the game, BUT for some of the players, it was most welcome! I actually flew a chopper for more than 10 seconds yesterday, and i haven't been able to do that since BF3(!!) It is wrong to limit the game if you do it incorrectly, you either gotta get over the hump, or turn back right away. We go based on what the majority of people in our servers want, basically no matter what it is...and after that mindset falls over your regular playerbase they will verbally castrate anyone playing against the rules you set. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 3, 2014 Author Share Posted April 3, 2014 Originally Posted by TMiland*: It is wrong to limit the game if you do it incorrectly, you either gotta get over the hump, or turn back right away. We go based on what the majority of people in our servers want, basically no matter what it is...and after that mindset falls over your regular playerbase they will verbally castrate anyone playing against the rules you set.Yeah, i agree. These limits are added because most players wants them, and the players that use the vehicles goes mad just because they cannot longer get easy kills. I limit the AA, because you can sit in your own base and shoot down the chopper in the enemy base, and that sucks the fun out of the game. And with Naval Strike out for just a few days now, the gunship has raped the whole map round after round, so most players wants this. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 3, 2014 Author Share Posted April 3, 2014 Originally Posted by PapaCharlie9*: I have tested this limit, to prohibit the use of GunshipLooks good. Since it is a completely different purpose from AA Mine/MAA, I suggest that you create a new thread with this limit. It will make it easier for people to find. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 3, 2014 Author Share Posted April 3, 2014 Originally Posted by TMiland*: Looks good. Since it is a completely different purpose from AA Mine/MAA, I suggest that you create a new thread with this limit. It will make it easier for people to find.Done! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 7, 2014 Author Share Posted April 7, 2014 Originally Posted by Tomgun*: aarrhh man seriously, whats wrong with the mobile AA * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 7, 2014 Author Share Posted April 7, 2014 Originally Posted by TMiland*: aarrhh man seriously, whats wrong with the mobile AA You can sit in your own base and rape the enemy air vehicles, even in the enemy base, that's what's wrong with it. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted November 24, 2015 Author Share Posted November 24, 2015 Originally Posted by Balu00*: Can also insert a kill limit? This one makes 15 kills with the Mobile AA max and then kill at more kills TBAN. Or can I change in this version already? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 23, 2015 Author Share Posted December 23, 2015 Originally Posted by VBK-Clan*: Hi guys it is possible vehicle spawn times separately to make available a Then i can put the spawn time AA to 15 Min or longer ,then we can play whit out OP AA then he can shot from a side of map to end of map and we cant destroy hem ,short range of tv gun etc.... vars.LAV-ADSpawnDelay 500 vars.TYPE 95 AASpawnDelay 500 vars.AH-1Z VIPERSpawnDelay 25 vars.Z-10WSpawnDelay 25 vars.M1 ABRAMSSpawnDelay 25 vars.TYPE 95 AASpawnDelay 25 vars.UH-1Y VENOMSpawnDelay 25 vars.Z-9 HAITUNSpawnDelay 25 vars.Z-9 HAITUNSpawnDelay 25 * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted November 27, 2016 Author Share Posted November 27, 2016 Originally Posted by BuRockK*: Can anyone change this limit to have kill limits instead of prohibiting? I tried to do it but couldnt know how since it shows death sometimes. I tried using Weapon.VehicleName (i think im using wrong syntax_) upon "death" to be sure its AA or but that didnt help. I need to limit use of both AA to 30 kills max but start warn after 20 kills. Warn Message saying how many kills the player has left and when only 3 left, it will state that player will be killed ONCE after 30 kills and KICKED when has 32 kills with those. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted November 28, 2016 Author Share Posted November 28, 2016 Originally Posted by BuRockK*: Okay, heres a question. Although i didnt understand some of the codes on first page, its basicly same thing i need. Only that punishment/warning needs to starts after 20 kills and that its only for current round. So on next round, kill limit will reset for a fresh start. Correct me if im missing anything else: - Change ".Data." to ".RoundData." so it will reset on new round - Change "if (Count == 1)" to "if (Count >= 20 || Count - Set additional warning message at "Count = 30" indicating player will be KICKED on his next AA kill. Would this work? But i also want to treat both AA kills as same so player wont have 30 kills with Mobile AA and switch to AA Vehicle. So, ill use the code in first post * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted November 29, 2016 Author Share Posted November 29, 2016 Originally Posted by Chilace*: Would this work? But i also want to treat both AA kills as same so player wont have 30 kills with Mobile AA and switch to AA Vehicle. So, ill use the code in first postWhat do you mean? Mobile AA is the same thing as AA Vehicle. Second weapon in that limit is AA Mine - engineer gadget.Also pay attention: - Change "if (Count == 1)" to "if (Count >= 20 && Count * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted November 29, 2016 Author Share Posted November 29, 2016 Originally Posted by BuRockK*: What do you mean? Mobile AA is the same thing as AA Vehicle. Second weapon in that limit is AA Mine - engineer gadget. Also pay attention: As far as i know, Mobile AA is that gadget you deploy on ground that fires missiles when an Air Vehicle is in range and the AA vehicle is the Air defence tank people use mostly. I wanted those to be counted as one. - Well, i couldnt really follow up on the code. Seemed too complex for me for some reason (and that there are some parts i dont know how it works). So i started to write my own. Not finished yet but hopefully will work if i manage to do it right. Heres what ive done so far (didnt had much time to finish it yet): - OnKill - First_check Expression: ( Regex.Match(kill.Weapon, @"(AA Mine|LAV_AD|Tunguska|PGZ-95)").Success ) - Second_check: code (unfinished) Code: double kCount = limit.Activations(killer.Name); //if (limit.Activations(killer.Name, TimeSpan.FromSeconds(5)) > 1) { // int kCount = kCount - 1; //} double playerAAKillsTotal = 20; double timesActivated = kCount; double playerAAKillsLeft = playerAAKillsTotal - timesActivated; String msg1 = "AA Mine, LAV_AD, Tunguska and PGZ-95 are limited to 20 kills in total"; String msg2 = plugin.R("You have "+ playerAAKillsLeft +" AA kills left"); String yell1 = "LIMITED: AA Mine / LAV_AD / Tunguska / PGZ-95"; if (timesActivated == 1) { //plugin.SendPlayerMessage(killer.Name, plugin.R("+ msg1 +")); plugin.PRoConChat(plugin.R("AA Limit msg1 sent to " + killer.Name + "")); }EDIT: Yes i meant AA Mine when i said Mobile AA, sorry I also deleted && from code as you can see above. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted November 29, 2016 Author Share Posted November 29, 2016 Originally Posted by Chilace*: I tried to modify the first limit, so that it was better suited to you. NOT TESTED Create a new limit to evaluate OnKill, call it "Limit AA", leave Action set to None. Set first_check to this Code: Code: /* Version 9.16 */ /* SETUP */ // Message templates // {0} will be replaced with PlayerName // {1} will be replaced by limited weapon/vehicle name, see below // {2} will be replaced with total kills to kick // {3} will be replaced with kills left to kick String autoWarned = "{0} AUTO-WARNED for using the LIMITED {1} by {2} kills in total, {3} kills left to kick"; String autoKilled = "{0} AUTO-KILLED as a last warning for using the LIMITED {1}"; String autoKicked = "{0} AUTO-KICKED for {2} kills using the LIMITED {1}"; String yellWarned = "The {1} is limited. You will be AUTO-KICKED upon {2} kills with it, {3} kills left to kick"; String yellKilled = "The {1} is limited. You will be AUTO-KICKED next time you use it again"; // Times int killsTotal = 30; // kills int killsThreshold = 10; // kills int yellTime = 20; // seconds double multiKillTime = 5; // seconds /* CODE */ if (!Regex.Match(kill.Weapon, @"(LAV_AD|Tunguska|PGZ-95|AA Mine)").Success) return false; String limited = "AA Vehicle/Mine"; String key = "PersistAA_" + killer.Name; 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); int count = 0; if (plugin.RoundData.issetInt(key)) count = plugin.RoundData.getInt(key); count = count + 1; int killsLeft = 0; killsLeft = killsTotal - count; String msg = null; if (count > killsTotal - killsThreshold && count < killsTotal - 1) { // Warn msg = String.Format(autoWarned, killer.Name, limited, killsTotal.ToString(), killsLeft.ToString()); plugin.SendGlobalMessage(msg); plugin.SendPlayerYell(killer.Name, String.Format(yellWarned, killer.Name, limited, killsTotal.ToString(), killsLeft.ToString()), yellTime); plugin.PRoConChat("ADMIN > " + msg); plugin.PRoConEvent(msg, "Insane Limits"); } else if (count == killsTotal - 1) { // Kill msg = String.Format(autoKilled, killer.Name, limited); plugin.SendGlobalMessage(msg); plugin.SendPlayerYell(killer.Name, String.Format(yellKilled, killer.Name, limited), yellTime); plugin.PRoConChat("ADMIN > " + msg); plugin.PRoConEvent(msg, "Insane Limits"); plugin.KillPlayer(killer.Name, 6); } else if (count >= killsTotal) { // Kick msg = String.Format(autoKicked, killer.Name, limited, killsTotal.ToString()); plugin.SendGlobalMessage(msg); plugin.PRoConChat("ADMIN > " + msg); plugin.PRoConEvent(msg, "Insane Limits"); plugin.KickPlayerWithMessage(killer.Name, msg); } plugin.RoundData.setInt(key, count); return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted November 30, 2016 Author Share Posted November 30, 2016 Originally Posted by BuRockK*: Thanks man, i will test this as soon as i can * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 1, 2016 Author Share Posted December 1, 2016 Originally Posted by BuRockK*: Anyone know the code for LAV-25 Anti Air? it seems thats another anti air vehicle * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted December 1, 2016 Author Share Posted December 1, 2016 Originally Posted by BuRockK*: Ok ive checked the weapon codes list by LumPenPacK and it shows its infantry vehicle. But in Procon it shows "LAV-25 Anti Air" when someone makes a kill with it * 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.