ImportBot Posted April 19, 2014 Author Share Posted April 19, 2014 Originally Posted by EdgarAllan*: EDIT: Nevermind, it just appeared to be a server glitch. So I changed all of the warning messages when a player kills with a non-pistol from a chat message (admin.say) to a yell message to the player (admin.yell) and they don't show up for the player. Did I overlook a semicolon or something anywhere? It seems only the yell messages directed publicly (stuff like "PISTOL MODE NOW ENGAGED") show up. Thanks Code: /* VERSION 0.0.8/R3 */ if (killer.Name == victim.Name) return false; // don't punish Suicides if (Regex.Match(kill.Weapon, @"(_:SoldierCollision,DamageArea,Suicide,RoadKill)", RegexOptions.IgnoreCase).Success) return false; // don't punish weird death cases String kPistols = "Pistols only toggle"; // plugin.Data bool bool isPistolsOnly = false; if (plugin.Data.issetBool(kPistols)) isPistolsOnly = plugin.Data.getBool(kPistols); if (!isPistolsOnly || kill.Category == "Handgun") return false; String kCounter = killer.Name + "_TreatAsOne_Count_Pistol"; TimeSpan time = TimeSpan.FromSeconds(1); // Activations within 1 seconds count as 1 int warnings = 0; if (server.Data.issetInt(kCounter)) warnings = server.Data.getInt(kCounter); /* The first time through, warnings is zero. Whether this is an isolated activation or the first of a sequence of activations in a short period of time, do something on this first time through. */ String msg = "none"; if (warnings == 0) { msg = "We are playing Pistols & Knife only!"; plugin.ServerCommand("admin.yell", "FINAL WARNING " + killer.Name + "! " + msg, "player", killer.Name); plugin.ServerCommand("admin.yell", msg, "15", "player", killer.Name); plugin.PRoConChat("ADMIN to " + killer.Name + "> " + msg); plugin.KillPlayer(killer.Name, 5); server.Data.setInt(kCounter, warnings+1); return false; } /* The second and subsequent times through, check to make sure we are not getting multiple activations in a short period of time. Ignore if less than the time span required. */ if (limit.Activations(killer.Name, time) > 1) return false; /* We get here only if there was exactly one activation in the time span */ if (warnings == 1) { msg = "Pistols & Knife only, next infraction will result in a ban!"; plugin.ServerCommand("admin.yell", "FINAL WARNING " + killer.Name + "!" + msg, "player", killer.Name); plugin.ServerCommand("admin.yell", msg, "10", "player", killer.Name); plugin.PRoConChat("ADMIN to " + killer.Name + ">" + msg); plugin.KickPlayerWithMessage(killer.Name, msg); } else { msg = "Temp banning " + killer.Name + " for not using a pistol or knife. 1 Hour."; plugin.SendGlobalMessage(msg); plugin.ServerCommand("admin.say", msg); plugin.PRoConChat("ADMIN > " + msg); plugin.PRoConEvent(msg, "Insane Limits"); plugin.EABanPlayerWithMessage(EABanType.EA_GUID, EABanDuration.Temporary, killer.Name, 60, msg); } server.Data.setInt(kCounter, warnings+1); return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 19, 2014 Author Share Posted April 19, 2014 Originally Posted by PapaCharlie9*: EDIT: Nevermind, it just appeared to be a server glitch. So I changed all of the warning messages when a player kills with a non-pistol from a chat message (admin.say) to a yell message to the player (admin.yell) and they don't show up for the player. Did I overlook a semicolon or something anywhere? It seems only the yell messages directed publicly (stuff like "PISTOL MODE NOW ENGAGED") show up. Thanks Code: /* VERSION 0.0.8/R3 */ if (killer.Name == victim.Name) return false; // don't punish Suicides if (Regex.Match(kill.Weapon, @"(_:SoldierCollision,DamageArea,Suicide,RoadKill)", RegexOptions.IgnoreCase).Success) return false; // don't punish weird death cases String kPistols = "Pistols only toggle"; // plugin.Data bool bool isPistolsOnly = false; if (plugin.Data.issetBool(kPistols)) isPistolsOnly = plugin.Data.getBool(kPistols); if (!isPistolsOnly || kill.Category == "Handgun") return false; String kCounter = killer.Name + "_TreatAsOne_Count_Pistol"; TimeSpan time = TimeSpan.FromSeconds(1); // Activations within 1 seconds count as 1 int warnings = 0; if (server.Data.issetInt(kCounter)) warnings = server.Data.getInt(kCounter); /* The first time through, warnings is zero. Whether this is an isolated activation or the first of a sequence of activations in a short period of time, do something on this first time through. */ String msg = "none"; if (warnings == 0) { msg = "We are playing Pistols & Knife only!"; plugin.ServerCommand("admin.yell", "FINAL WARNING " + killer.Name + "! " + msg, "player", killer.Name); plugin.ServerCommand("admin.yell", msg, "15", "player", killer.Name); plugin.PRoConChat("ADMIN to " + killer.Name + "> " + msg); plugin.KillPlayer(killer.Name, 5); server.Data.setInt(kCounter, warnings+1); return false; } /* The second and subsequent times through, check to make sure we are not getting multiple activations in a short period of time. Ignore if less than the time span required. */ if (limit.Activations(killer.Name, time) > 1) return false; /* We get here only if there was exactly one activation in the time span */ if (warnings == 1) { msg = "Pistols & Knife only, next infraction will result in a ban!"; plugin.ServerCommand("admin.yell", "FINAL WARNING " + killer.Name + "!" + msg, "player", killer.Name); plugin.ServerCommand("admin.yell", msg, "10", "player", killer.Name); plugin.PRoConChat("ADMIN to " + killer.Name + ">" + msg); plugin.KickPlayerWithMessage(killer.Name, msg); } else { msg = "Temp banning " + killer.Name + " for not using a pistol or knife. 1 Hour."; plugin.SendGlobalMessage(msg); plugin.ServerCommand("admin.say", msg); plugin.PRoConChat("ADMIN > " + msg); plugin.PRoConEvent(msg, "Insane Limits"); plugin.EABanPlayerWithMessage(EABanType.EA_GUID, EABanDuration.Temporary, killer.Name, 60, msg); } server.Data.setInt(kCounter, warnings+1); return false; Whatever version you started with already had errors in it and it looks like you added more. Try starting over with post #1. It already has yells in it, so there's nothing to change for that. What's not in post #1 that you need? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 19, 2014 Author Share Posted April 19, 2014 Originally Posted by EdgarAllan*: I solved my issues by tweaking the new updated Post #1. Thanks!! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 1, 2014 Author Share Posted May 1, 2014 Originally Posted by Cheezis_Chrust*: Hey guys, I configured these for a Pistols, Knives, and Explosives only server - and after some testing with a friend they all seemed to work great. For a round or two, anyway. After that, they just seemed to...stop working. I reloaded insane limits, restarted procon, double and truple checked virtual mode wasn't accidentally enabled...but it just doesn't seem to work again. (As of last night) Can you please see if I made a mistake somewhere? I know this will take a few minutes, and I really appreciate it. Thanks! First limit, OnAnyChat 1st Code Code: /* VERSION R4 */ String kPistols = "Pistols only toggle"; // plugin.Data bool bool isPistolsOnly = false; String tag = player.Tag; if (tag.Length == 0) { // Maybe they are using [_-=]XXX[=-_]PlayerName format Match tm = Regex.Match(player.Name, @"^[=_\-]_([^=_\-]{2,4})[=_\-]"); if (tm.Success) { tag = tm.Groups[1].Value; } else { tag = "no tag"; } } if (!plugin.isInList(player.Name, "admins") && !plugin.isInList(tag, "admins")) return false; Match m = Regex.Match(player.LastChat, @"^\s*!weapons_\s+(on|off)", RegexOptions.IgnoreCase); if (!m.Success) return false; String mode = m.Groups[1].Value; if (mode == "on") { isPistolsOnly = true; } else if (mode == "off") { isPistolsOnly = false; } if (isPistolsOnly) { plugin.SendGlobalMessage("*** [WEAPON LOCK : ACTIVATED] ***"); plugin.ServerCommand("admin.yell", "[WEAPON LOCK : ACTIVATED]"); plugin.ServerCommand("vars.serverDescription", "::[iPwn] 24/7 TDM - Pistols, Knives, Explosives Only [ON] Read the !rules"); plugin.ServerCommand("vars.serverName", "::[iPwn] 24/7 TDM - Pistols, Knives, Explosives Only : [ON]"); } else { List<PlayerInfoInterface> all = new List<PlayerInfoInterface>(); all.AddRange(team1.players); all.AddRange(team2.players); if (team3.players.Count > 0) all.AddRange(team3.players); if (team4.players.Count > 0) all.AddRange(team4.players); foreach (PlayerInfoInterface p in all) { String kCounter = p.Name + "_TreatAsOne_Count_Pistol"; if (server.Data.issetInt(kCounter)) server.Data.unsetInt(kCounter); } plugin.SendGlobalMessage("*** [WEAPON LOCK : DEACTIVATED] ***"); plugin.ServerCommand("admin.yell", "[WEAPON LOCK : DEACTIVATED]"); plugin.ServerCommand("vars.serverDescription", "::[iPwn] 24/7 TDM - Pistols, Knives, Explosives Only [OFF] (Weapons Free)"); plugin.ServerCommand("vars.serverName", "::[iPwn] 24/7 TDM - Pistols, Knives, Explosives Only : [OFF]"); } plugin.Data.setBool(kPistols, isPistolsOnly); return false; 2nd limit, OnKill 1st Expression Code: (true)2nd CodeCode: /* VERSION R4 */ if (killer.Name == victim.Name) return false; // don't punish Suicides if (Regex.Match(kill.Weapon, @"(_:SoldierCollision|DamageArea|Suicide|RoadKill)", RegexOptions.IgnoreCase).Success) return false; // don't punish weird death cases String kPistols = "Pistols only toggle"; // plugin.Data bool bool isPistolsOnly = false; if (plugin.Data.issetBool(kPistols)) isPistolsOnly = plugin.Data.getBool(kPistols); if (!isPistolsOnly || Regex.Match(kill.Weapon, @"(_:U_Taurus44|U_HK45C|U_CZ75|U_FN57|U_M1911|U_M9 |U_MP412Rex|U_MP443|U_P226|U_QSZ92|U_SW40|SW40|U_G18|U_93R|Melee|SEAL|U_RGO Impact|U_Grenade_RGO|U_M67|U_SRAW|U_MGL|U_NLAW|U_Repairtool|U_RPG7|U_SLAM|U_SMAW|AA Mine|U_Defib|U_Claymore|U_C4|U_MGL|U_M320 MGL|U_M320 HE|U_M320 LVG|U_M320 FB|U_XM25|U_M224 Mortar)", RegexOptions.IgnoreCase).Success) return false; String kCounter = killer.Name + "_TreatAsOne_Count_Pistol"; TimeSpan time = TimeSpan.FromSeconds(1); // Activations within 1 seconds count as 1 int warnings = 0; if (server.Data.issetInt(kCounter)) warnings = server.Data.getInt(kCounter); /* The first time through, warnings is zero. Whether this is an isolated activation or the first of a sequence of activations in a short period of time, do something on this first time through. */ String msg = "none"; if (warnings == 0) { msg = "WEAPONS ARE RESTRICTED TO PISTOLS/KNIVES/EXPLOSIVES"; plugin.ServerCommand("admin.say", "FINAL WARNING " + killer.Name + "! " + msg, "player", killer.Name); plugin.ServerCommand("admin.yell", msg, "15", "player", killer.Name); plugin.PRoConChat("ADMIN to " + killer.Name + "> " + msg); plugin.KillPlayer(killer.Name, 5); server.Data.setInt(kCounter, warnings+1); return false; } /* The second and subsequent times through, check to make sure we are not getting multiple activations in a short period of time. Ignore if less than the time span required. */ if (limit.Activations(killer.Name, time) > 1) return false; /* We get here only if there was exactly one activation in the time span */ if (warnings == 1) { msg = "WEAPONS ARE RESTRICTED TO PISOLS/KNIVES/EXPLOSIVES. YOU WILL BE BANNED IF YOU VIOLATE THIS RULE AGAIN"; plugin.ServerCommand("admin.say", "FINAL WARNING " + killer.Name + "!" + msg, "player", killer.Name); plugin.ServerCommand("admin.yell", msg, "10", "player", killer.Name); plugin.PRoConChat("ADMIN to " + killer.Name + ">" + msg); plugin.KickPlayerWithMessage(killer.Name, msg); } else { msg = "TEMP BAN: " + killer.Name + " RESTRICTED WEAPON"; plugin.SendGlobalMessage(msg); plugin.ServerCommand("admin.yell", msg); plugin.PRoConChat("ADMIN > " + msg); plugin.PRoConEvent(msg, "Insane Limits"); plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 10, msg); } server.Data.setInt(kCounter, warnings+1); return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 1, 2014 Author Share Posted May 1, 2014 Originally Posted by PapaCharlie9*: Hey guys, I configured these for a Pistols, Knives, and Explosives only server - and after some testing with a friend they all seemed to work great. For a round or two, anyway. After that, they just seemed to...stop working. I reloaded insane limits, restarted procon, double and truple checked virtual mode wasn't accidentally enabled...but it just doesn't seem to work again. (As of last night) Can you please see if I made a mistake somewhere? I know this will take a few minutes, and I really appreciate it. Thanks! Which one isn't working? The !pistol on/off command, or the limit on weapon kills? After restarting everything, did an admin type in !pistols on? If not, that would explain why it is not working. It starts up turned off. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 7, 2014 Author Share Posted May 7, 2014 Originally Posted by EdgarAllan*: Is there anything I can modify so this plugin does NOT punish for levelution type kills? We had a player get kicked when the killfeed read "Player1 KILLED Player2" with what I'm guessing was the exploding barrels. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 7, 2014 Author Share Posted May 7, 2014 Originally Posted by TMiland*: Is there anything I can modify so this plugin does NOT punish for levelution type kills? We had a player get kicked when the killfeed read "Player1 KILLED Player2" with what I'm guessing was the exploding barrels.Hi, this should be covered in the second check limit: Code: if (Regex.Match(kill.Weapon, @"(_:SoldierCollision,DamageArea,Suicide,RoadKill)", RegexOptions.IgnoreCase).Success) return false; // don't punish weird death casesCan you post your second check code? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 7, 2014 Author Share Posted May 7, 2014 Originally Posted by PapaCharlie9*: Hi, this should be covered in the second check limit: Code: if (Regex.Match(kill.Weapon, @"(_:SoldierCollision,DamageArea,Suicide,RoadKill)", RegexOptions.IgnoreCase).Success) return false; // don't punish weird death casesCan you post your second check code? That should be: Code: if (Regex.Match(kill.Weapon, @"(_:SoldierCollision|DamageArea|Suicide|RoadKill)", RegexOptions.IgnoreCase).Success) return false; // don't punish weird death casesIf you have the commas version, that would explain why it didn't work. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 8, 2014 Author Share Posted May 8, 2014 Originally Posted by EdgarAllan*: Thank you again PapaCharlie. I have no idea where I got the "comma version" from! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 12, 2014 Author Share Posted May 12, 2014 Originally Posted by Cheezis_Chrust*: Which one isn't working? The !pistol on/off command, or the limit on weapon kills? After restarting everything, did an admin type in !pistols on? If not, that would explain why it is not working. It starts up turned off.The limit to kill. It keeps giving me this: [22:46:08 42] [insane Limits] Thread(settings): Compiling Limit #5 - PistolsKill - OnKill [22:46:08 57] [insane Limits] Thread(settings): ERROR: 2 errors compiling Expression [22:46:08 57] [insane Limits] Thread(settings): ERROR: (CS1026, line: 54, column: 56): ) expected [22:46:08 57] [insane Limits] Thread(settings): ERROR: (CS1002, line: 54, column: 68): ; expected The only expression on that limit is Code: (true)And the second check is this code: Code: /* VERSION R4 */ if (killer.Name == victim.Name) return false; // don't punish Suicides if (Regex.Match(kill.Weapon, @"(_:SoldierCollision|DamageArea|Suicide|RoadKill)", RegexOptions.IgnoreCase).Success) return false; // don't punish weird death cases String kPistols = "Pistols only toggle"; // plugin.Data bool bool isPistolsOnly = false; if (plugin.Data.issetBool(kPistols)) isPistolsOnly = plugin.Data.getBool(kPistols); if (!isPistolsOnly || kill.Weapon == "U_M93R" || Regex.Match(kill.Weapon, @"(_:U_Taurus44|U_HK45C|U_CZ75|U_FN57|U_M1911|U_M9|U_MP412Rex|U_MP443|U_P226|U_QSZ92|U_SW40|SW40|U_G18|U_93R|Melee|SEAL|U_RGO Impact|U_Grenade_RGO|U_M67|U_SRAW|U_MGL|U_NLAW|U_Repairtool|U_RPG7|U_SLAM|U_SMAW|AA Mine|U_Defib|U_Claymore|U_C4|U_MGL|U_M320|M320|U_XM25|U_M224 Mortar)", RegexOptions.IgnoreCase).Success) return false; if (plugin.isInList(player.Name, "admins") return false String kCounter = killer.Name + "_TreatAsOne_Count_Pistol"; TimeSpan time = TimeSpan.FromSeconds(1); // Activations within 1 seconds count as 1 int warnings = 0; if (server.Data.issetInt(kCounter)) warnings = server.Data.getInt(kCounter); /* The first time through, warnings is zero. Whether this is an isolated activation or the first of a sequence of activations in a short period of time, do something on this first time through. */ String msg = "none"; if (warnings == 0) { msg = "WEAPONS ARE RESTRICTED TO PISTOLS/KNIVES/EXPLOSIVES"; plugin.ServerCommand("admin.say", "FINAL WARNING " + killer.Name + "! " + msg, "player", killer.Name); plugin.ServerCommand("admin.yell", msg, "15", "player", killer.Name); plugin.PRoConChat("ADMIN to " + killer.Name + "> " + msg); plugin.KillPlayer(killer.Name, 5); server.Data.setInt(kCounter, warnings+1); return false; } /* The second and subsequent times through, check to make sure we are not getting multiple activations in a short period of time. Ignore if less than the time span required. */ if (limit.Activations(killer.Name, time) > 1) return false; /* We get here only if there was exactly one activation in the time span */ if (warnings == 1) { msg = "WEAPONS ARE RESTRICTED TO PISOLS/KNIVES/EXPLOSIVES. YOU WILL BE BANNED IF YOU VIOLATE THIS RULE AGAIN"; plugin.ServerCommand("admin.say", "FINAL WARNING " + killer.Name + "!" + msg, "player", killer.Name); plugin.ServerCommand("admin.yell", msg, "10", "player", killer.Name); plugin.PRoConChat("ADMIN to " + killer.Name + ">" + msg); plugin.KickPlayerWithMessage(killer.Name, msg); } else { msg = "TEMP BAN: " + killer.Name + " RESTRICTED WEAPON"; plugin.SendGlobalMessage(msg); plugin.ServerCommand("admin.yell", msg); plugin.PRoConChat("ADMIN > " + msg); plugin.PRoConEvent(msg, "Insane Limits"); plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 10, msg); } server.Data.setInt(kCounter, warnings+1); return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 12, 2014 Author Share Posted May 12, 2014 Originally Posted by Cheezis_Chrust*: I tried again without this and it works Code: if (plugin.isInList(player.Name, "admins") return falseAny idea why? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 14, 2014 Author Share Posted May 14, 2014 Originally Posted by PapaCharlie9*: I tried again without this and it works Code: if (plugin.isInList(player.Name, "admins") return falseAny idea why?Yes, sorry. That's a typo. It should be: Code: if (plugin.isInList(player.Name, "admins")) return falseIt's missing a ), just like the error says. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 16, 2014 Author Share Posted May 16, 2014 Originally Posted by superg*: Code: if (!isPistolsOnly || kill.Category == "Handgun") return false;I assume i can add other categories to the line above and it will work ok? Code: if (!isPistolsOnly || kill.Category == "Handgun|Melee|Explosive") return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 16, 2014 Author Share Posted May 16, 2014 Originally Posted by PapaCharlie9*: Code: if (!isPistolsOnly || kill.Category == "Handgun") return false;I assume i can add other categories to the line above and it will work ok? Code: if (!isPistolsOnly || kill.Category == "Handgun|Melee|Explosive") return false; Not exactly. The "(X|Y|Z)" syntax is only for Regex.Match function calls. If you already have a Regex.Match, like Code: if (!Regex.Match(kill.Category, "(Explosive|Impact)").Success) return false;Then adding another item to match is easy: Code: if (!Regex.Match(kill.Category, "(Explosive|Impact|Melee)").Success) return false;If you don't already have a Regex.Match, it's best to just add each individual new item as a new comparison: Code: if (!isPistolsOnly || kill.Category == "Handgun" || kill.Category == "Melee" || kill.Category == "Explosive") return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 17, 2014 Author Share Posted May 17, 2014 Originally Posted by superg*: Thank you for that info PapaCharlie9. That clears up my confusion on why it would not work correctly. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted August 13, 2014 Author Share Posted August 13, 2014 Originally Posted by avengedthedead*: Hello Papa, Good day to you. Is it possible to make this limit like a special event in the round. When i type !pistol on there will be special series of countdown of 10 seconds before the mode is activated and run for like 10 mins (time can be edited) and again countdown of 10 seconds before the mode goes normal again (All weapons are free). This is for BF4. What do you think? Is it possible? How i wish i have knowledge like you do. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted August 16, 2014 Author Share Posted August 16, 2014 Originally Posted by avengedthedead*: Hello Papa, Good day to you. Is it possible to make this limit like a special event in the round. When i type !pistol on there will be special series of countdown of 10 seconds before the mode is activated and run for like 10 mins (time can be edited) and again countdown of 10 seconds before the mode goes normal again (All weapons are free). This is for BF4. What do you think? Is it possible? How i wish i have knowledge like you do. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted August 16, 2014 Author Share Posted August 16, 2014 Originally Posted by PapaCharlie9*: Hello Papa, Good day to you. Is it possible to make this limit like a special event in the round. When i type !pistol on there will be special series of countdown of 10 seconds before the mode is activated and run for like 10 mins (time can be edited) and again countdown of 10 seconds before the mode goes normal again (All weapons are free). This is for BF4. What do you think? Is it possible? How i wish i have knowledge like you do. It's possible, but difficult. Anything having to do with timers or countdowns is difficult. I don't have time to write a new version now, maybe someone else can? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted August 17, 2014 Author Share Posted August 17, 2014 Originally Posted by avengedthedead*: It's possible, but difficult. Anything having to do with timers or countdowns is difficult. I don't have time to write a new version now, maybe someone else can?Hello Papa, Thank you for your reply. I understand. I've tested this limit in my server and it has become very popular and all to your work. This is the reason why i would like to have the modification version if possible and i'm willing to donate/contribute to anyone who can make this possible. Again how i wish that i have knowledge like you do. I admire your brilliance. Regards, Avengedthedead * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 24, 2015 Author Share Posted March 24, 2015 Originally Posted by ParadoxCAV*: Is there any way to allow the admin list to bypass the kill/kick/ban actions? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 25, 2015 Author Share Posted March 25, 2015 Originally Posted by PapaCharlie9*: Is there any way to allow the admin list to bypass the kill/kick/ban actions?Why? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 25, 2015 Author Share Posted March 25, 2015 Originally Posted by ParadoxCAV*: If someone is sniping players on server with pistol mode on the admins would be able to snipe the sniper before he is able to kill a player that is following the rules. It's just something to help keep the game flowing without getting killed by other guns the entire time. Getting a playername from very far has also proven difficult and this just seems like the best option. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 28, 2015 Author Share Posted March 28, 2015 Originally Posted by PapaCharlie9*: If someone is sniping players on server with pistol mode on the admins would be able to snipe the sniper before he is able to kill a player that is following the rules. It's just something to help keep the game flowing without getting killed by other guns the entire time. Getting a playername from very far has also proven difficult and this just seems like the best option. Sniping with a pistol? Isn't that fair game when pistol mode is on? I'm still not understanding the situation. If that is a real problem, are they all headshots? It would be possible to do automatic punishment for too many or even just one headshot. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 29, 2015 Author Share Posted March 29, 2015 Originally Posted by Chilace*: How do I change this limit? 1) Show the punishment message in the public chat, not just killer 2) Punish by adminkill only (neither kick nor ban) Thanks * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 29, 2015 Author Share Posted March 29, 2015 Originally Posted by PapaCharlie9*: How do I change this limit? 1) Show the punishment message in the public chat, not just killer 2) Punish by adminkill only (neither kick nor ban) Thanks In Step 3, OnKill second_check Code, find the comment that starts: /* The first time through, warnings is zero. Replace from those lines all the way to the end with this: Code: /* The first time through, warnings is zero. Whether this is an isolated activation or the first of a sequence of activations in a short period of time, do something on this first time through. */ String msg = "none"; if (warnings == 0) { msg = "We are playing pistols only!"; plugin.SendGlobalMessage("WARNING " + killer.Name + "! " + msg); plugin.SendGlobalYell(msg, 15); plugin.PRoConChat("ADMIN> " + msg); plugin.KillPlayer(killer.Name, 5); server.Data.setInt(kCounter, warnings+1); return false; } /* The second and subsequent times through, check to make sure we are not getting multiple activations in a short period of time. Ignore if less than the time span required. */ if (limit.Activations(killer.Name, time) > 1) return false; /* We get here only if there was exactly one activation in the time span */ if (warnings > 0) { msg = "Pistols only!"; plugin.SendGlobalMessage("WARNING " + killer.Name + "!" + msg); plugin.SendGlobalYell(msg, 10); plugin.PRoConChat("ADMIN>" + msg); plugin.KillPlayer(killer.Name, 5); } server.Data.setInt(kCounter, warnings+1); return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2015 Author Share Posted April 15, 2015 Originally Posted by Random_Digits*: What is the Phantome Bow code for Insane Limits 0.2.17.0? After three days searching, alas i've found nothing but the old regix code stuff. Please help. Code: /* VERSION R4 */ if (killer.Name == victim.Name) return false; // don't punish Suicides if (Regex.Match(kill.Weapon, @"(_:SoldierCollision|DamageArea|Suicide|RoadKill)", RegexOptions.IgnoreCase).Success) return false; // don't punish weird death cases String kPistols = "Pistols only toggle"; // plugin.Data bool bool isPistolsOnly = false; if (plugin.Data.issetBool(kPistols)) isPistolsOnly = plugin.Data.getBool(kPistols); if (!isPistolsOnly || kill.Category == "Handgun" || kill.Category == "Melee" || kill.Category == "Knife" || kill.Category == "Phantom") return false; String kCounter = killer.Name + "_TreatAsOne_Count_Pistol"; TimeSpan time = TimeSpan.FromSeconds(1); // Activations within 1 seconds count as 1 int warnings = 0; if (server.Data.issetInt(kCounter)) warnings = server.Data.getInt(kCounter); /* The first time through, warnings is zero. Whether this is an isolated activation or the first of a sequence of activations in a short period of time, do something on this first time through. */ String msg = "none"; if (warnings == 0) { msg = "We are playing Bow/Pistol/Knife only!"; plugin.ServerCommand("admin.say", "FINAL WARNING " + killer.Name + "! " + msg, "player", killer.Name); plugin.ServerCommand("admin.yell", msg, "15", "player", killer.Name); plugin.PRoConChat("ADMIN to " + killer.Name + "> " + msg); plugin.KillPlayer(killer.Name, 5); server.Data.setInt(kCounter, warnings+1); return false; } /* The second and subsequent times through, check to make sure we are not getting multiple activations in a short period of time. Ignore if less than the time span required. */ if (limit.Activations(killer.Name, time) > 1) return false; /* We get here only if there was exactly one activation in the time span */ if (warnings == 1) { msg = "Pistols/Knife/Bow only, next time you are Tbanned!"; plugin.ServerCommand("admin.say", "FINAL WARNING " + killer.Name + "!" + msg, "player", killer.Name); plugin.ServerCommand("admin.yell", msg, "10", "player", killer.Name); plugin.PRoConChat("ADMIN to " + killer.Name + ">" + msg); plugin.KickPlayerWithMessage(killer.Name, msg); } else { msg = "Temp banning " + killer.Name + " for not using a proper weapon"; plugin.SendGlobalMessage(msg); plugin.ServerCommand("admin.yell", msg); plugin.PRoConChat("ADMIN > " + msg); plugin.PRoConEvent(msg, "Insane Limits"); plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 10, msg); } server.Data.setInt(kCounter, warnings+1); return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2015 Author Share Posted April 15, 2015 Originally Posted by Random_Digits*: I am running the script for Bow/Pistol/Knife. Knife and Pistol seem to work fine. But it still kills you on bow shots. In the line: if (!isPistolsOnly || kill.Category == "Handgun" || kill.Category == "Melee" || kill.Category == "Knife" || kill.Category == "Phantom") return false; I have tried; Phantom, Bow, Phantom Bow, dlSHTR. Is my syntax incorrect? Also, how do i Increase the warnings limit? * 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.