ImportBot Posted February 1, 2019 Author Share Posted February 1, 2019 Originally Posted by tchum*: Hi, i'm trying to make a script that will give the k/d ratio of the targeted player to player that request it. Everything is working except... except the most important part of the script, it give the k/d of the player that request it instead of the targeted player. If somone can help me, could be great! It's just the player.Kdr who give me problem in the last line of the code. Code: Match m = Regex.Match(player.LastChat, @"^\s*[/!@]kd\s+([^\s]+)", RegexOptions.IgnoreCase); if (!m.Success) return false; List<String> vips = plugin.GetReservedSlotsList(); if (!vips.Contains(player.Name)) { plugin.SendPlayerMessage(player.Name, "You Can't use this command."); return false; } // Match target player name String name = m.Groups[1].Value; List<PlayerInfoInterface> all = new List<PlayerInfoInterface>(); all.AddRange(team1.players); all.AddRange(team2.players); all.AddRange(team3.players); all.AddRange(team4.players); PlayerInfoInterface target = null; int count = 0; foreach (PlayerInfoInterface p in all) { if (Regex.Match(p.Name, name, RegexOptions.IgnoreCase).Success) { target = p; ++count; } } if (count == 0 || target == null) { plugin.SendPlayerMessage(player.Name, "No player name matches '" + name + "'"); return false; } else if (count > 1) { plugin.SendPlayerMessage(player.Name, "Too many names match '" + name + "', try again"); return false; } //NEED HELP HERE PLEASE. plugin.SendPlayerMessage(player.Name, target.Name + " Has a K/D of: " + player.Kdr ); return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 1, 2019 Author Share Posted February 1, 2019 Originally Posted by maxdralle*: Code: plugin.SendPlayerMessage(player.Name, target.Name + " Has a K/D of: " + target.Kdr ); * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 1, 2019 Author Share Posted February 1, 2019 Originally Posted by tchum*: Code: plugin.SendPlayerMessage(player.Name, target.Name + " Has a K/D of: " + target.Kdr ); Thank you for your help maxdrelle. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 4, 2019 Author Share Posted February 4, 2019 Originally Posted by Hodor*: Hi guys, please show me how to do whitelist just for 1 limit, i want whitelist by EA_GUID or PB_GUID if it possible: 199ccb0ea0.jpg * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 4, 2019 Author Share Posted February 4, 2019 Originally Posted by maxdralle*: @hodor everything is possible with insane limits. its the best plugin. IL expression for KD limit with ea guid whitelist: Code: (player.Kills/player.Deaths > 5) && (player.EAGuid != "EA_123...")or IL expression for KD limit with vip whitelist:Code: (player.Kills/player.Deaths > 5) && (!plugin.GetReservedSlotsList().Contains(player.Name)) * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 5, 2019 Author Share Posted February 5, 2019 Originally Posted by Hodor*: Thank you man! Work: Code: (player.Kills/player.Deaths > 5) && (player.EAGuid != "EA_123...")Doesnt work:Code: (player.Kills/player.Deaths > 5) && (!plugin.GetReservedSlotsList().Contains(player.Name)) * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 5, 2019 Author Share Posted February 5, 2019 Originally Posted by maxdralle*: it works. there is just an delay in insane limit to get a new reserved slot player. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 9, 2019 Author Share Posted February 9, 2019 Originally Posted by tomopcver*: Can I get player's PersonaId with InsaneLimits? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 12, 2019 Author Share Posted February 12, 2019 Originally Posted by xloneshadowx*: Can someone tell me why this is not working for the map Flood Zone and the little bird // chopper kill farm limit ////////////////////////////// // info > settings for insane limits: limit_evaluation: OnKill ; limit_first_check: Code ; limit_action: none // SETTINGS int MaxHeliKillsInfo = 40; // single info player yell int MaxHeliKillsPyell = 45; // warning player yell int MaxHeliKillsAdminKill = 50; // auto admin kill int MaxHeliKillsAutoKick = 60; // auto admin kick / 15 minute time ban bool useWhitelist = true; bool PutReservedSlotsInWhitelist = true; // SETTINGS - END if (useWhitelist && plugin.isInList(killer.Name, "Player_Whitelist")) { return false; } if ((PutReservedSlotsInWhitelist) && (plugin.GetReservedSlotsList().Contains(killer.Nam e))) { return false; } int iHeliKills = 0; if (server.PlayerCount if ((server.MapFileName == "MP_Siege") || (server.MapFileName == "MP_Tremors") || (server.MapFileName == "MP_Flooded")) { if (kill.Category == "VehicleAir") { if (server.RoundData.issetInt("chopper_kills_" + killer.Name)) iHeliKills = server.RoundData.getInt("chopper_kills_" + killer.Name); iHeliKills++; server.RoundData.setInt("chopper_kills_" + killer.Name, iHeliKills); if (iHeliKills >= MaxHeliKillsAutoKick) { // kick plugin.SendGlobalMessage("HELI-FARM-LIMIT: " + killer.Name + " BANNED (15 min.) for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round."); plugin.ConsoleWrite("^8^HELI-FARM-LIMIT:^8^n " + killer.Name + " BANNED (15 min.) for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round. (" + plugin.FriendlyMapName(server.MapFileName) + " - K/D: " + killer.KillsRound + "/" + killer.DeathsRound + " - Heli Kills: " + iHeliKills.ToString()); plugin.PRoConChat("^8^bHELI-FARM-LIMIT:^8^n " + killer.Name + " BANNED (15 min.) for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round. (" + plugin.FriendlyMapName(server.MapFileName) + " - K/D: " + killer.KillsRound + "/" + killer.DeathsRound + " - Heli Kills: " + iHeliKills.ToString()); plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 15, "TIME-BANNED (15 min.) for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round. (K/D/K.Heli: " + killer.KillsRound + "/" + killer.DeathsRound + "/" + iHeliKills.ToString() + ")"); } else if (iHeliKills >= MaxHeliKillsAdminKill) { // kill plugin.PRoConChat("^8^bHELI-FARM-LIMIT:^8^n " + killer.Name + " KILLED for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round."); plugin.SendGlobalMessage("HELI-FARM-LIMIT: " + killer.Name + " KILLED for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round."); plugin.SendPlayerYell(killer.Name, "[HELI-FARM-LIMIT] [WARNING]\n" + killer.Name +" KILLED for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round.\n Change your vehicle!", 10); plugin.KillPlayer(killer.Name); } else if (iHeliKills >= MaxHeliKillsPyell) { // warning yell plugin.PRoConChat("(Psay + Pyell " + killer.Name + ") ^8^bHELI-FARM-LIMIT:^8^n [WARNING] " + killer.Name + " only " + MaxHeliKillsPyell.ToString() + " Chopper kills per round! (" + iHeliKills + "/" + MaxHeliKillsAdminKill + ")"); plugin.SendPlayerYell(killer.Name, "[HELI-FARM-LIMIT] [WARNING]\n" + killer.Name + " only " + MaxHeliKillsPyell.ToString() + " Chopper kills per round! (" + iHeliKills + "/" + MaxHeliKillsAdminKill + ")", 4); plugin.SendPlayerMessage(killer.Name, "HELI-FARM-LIMIT: [WARNING] " + killer.Name +" only " + MaxHeliKillsPyell.ToString() + " Chopper kills per round! (" + iHeliKills + "/" + MaxHeliKillsAdminKill + ")"); } else if (iHeliKills >= MaxHeliKillsInfo) { // info yell plugin.PRoConChat("(Psay + Pyell " + killer.Name + ") [HELI-FARM-LIMIT] [iNFO] " + killer.Name +" only " + MaxHeliKillsPyell.ToString() + " Chopper kills per round! (" + iHeliKills + "/" + MaxHeliKillsAdminKill + ")"); plugin.SendPlayerYell(killer.Name, "[HELI-FARM-LIMIT] [iNFO]\n" + killer.Name +" only " + MaxHeliKillsPyell.ToString() + " Chopper kills per round! (" + iHeliKills + "/" + MaxHeliKillsAdminKill + ")", 10); plugin.SendPlayerMessage(killer.Name, "HELI-FARM-LIMIT: [iNFO] " + killer.Name +" only " + MaxHeliKillsPyell.ToString() + " Chopper kills per round! (" + iHeliKills + "/" + MaxHeliKillsAdminKill + ")"); } } } } * Restored post. It could be that the author is no longer active. Link to comment
B7ackhawk Posted November 16, 2019 Share Posted November 16, 2019 Hello there can you guys fix this code // Insane Limits - VIP Commands // !lead, !killme, !switchme // SETUP Insane Limits: Evaluation: OnAnyChat ; First_check: Code // SETTINGS bool EnableLeadCmd = true; // true / false bool EnableKillmeCmd = true; // true / false bool EnableSwitchmeCmd = true; // true / false // SETTINGS END if ((player.LastChat).Length < 1) { return false; } bool tmp_SendMsg = false; if (Regex.Match(player.LastChat, @"^/?[!|@]lead$", RegexOptions.IgnoreCase).Success) { // squad leader command if (EnableLeadCmd) { if (plugin.GetReservedSlotsList().Contains(player.Name)) { plugin.ServerCommand("squad.leader", player.TeamId.ToString(), player.SquadId.ToString(), player.Name); } else { tmp_SendMsg = true; } } } else if (Regex.Match(player.LastChat, @"^/?[!|@]killme$", RegexOptions.IgnoreCase).Success) { // killme command if (EnableKillmeCmd) { if (plugin.GetReservedSlotsList().Contains(player.Name)) { plugin.KillPlayer(player.Name); } else { tmp_SendMsg = true; } } } else if (Regex.Match(player.LastChat, @"^/?[!|@]switchme$", RegexOptions.IgnoreCase).Success) { // team switch command if (EnableSwitchmeCmd) { if (plugin.GetReservedSlotsList().Contains(player.Name)) { plugin.ServerCommand("admin.movePlayer", player.Name, server.OppositeTeamId(player.TeamId).ToString(), "0", "true"); } else { tmp_SendMsg = true; } } } // send message based on player language if (tmp_SendMsg) { if ((player.CountryCode == "br") || (player.CountryCode == "pt")) { // message for brasil, portugal plugin.SendPlayerMessage(player.Name, plugin.R("So para VIPs")); plugin.PRoConChat("PlayerSay " + player.Name + ") So para VIPs"); } else { // default message plugin.SendPlayerMessage(player.Name, plugin.R("Sorry, this command is for !VIP SLOT players only")); plugin.PRoConChat("PlayerSay " + player.Name + ") Sorry, this command is for !VIP SLOT players only"); } } i test it it not work Link to comment
B7ackhawk Posted November 16, 2019 Share Posted November 16, 2019 Hello there can you guys fix this code // Insane Limits - VIP Commands // !lead, !killme, !switchme // SETUP Insane Limits: Evaluation: OnAnyChat ; First_check: Code // SETTINGS bool EnableLeadCmd = true; // true / false bool EnableKillmeCmd = true; // true / false bool EnableSwitchmeCmd = true; // true / false // SETTINGS END if ((player.LastChat).Length < 1) { return false; } bool tmp_SendMsg = false; if (Regex.Match(player.LastChat, @"^/?[!|@]lead$", RegexOptions.IgnoreCase).Success) { // squad leader command if (EnableLeadCmd) { if (plugin.GetReservedSlotsList().Contains(player.Name)) { plugin.ServerCommand("squad.leader", player.TeamId.ToString(), player.SquadId.ToString(), player.Name); } else { tmp_SendMsg = true; } } } else if (Regex.Match(player.LastChat, @"^/?[!|@]killme$", RegexOptions.IgnoreCase).Success) { // killme command if (EnableKillmeCmd) { if (plugin.GetReservedSlotsList().Contains(player.Name)) { plugin.KillPlayer(player.Name); } else { tmp_SendMsg = true; } } } else if (Regex.Match(player.LastChat, @"^/?[!|@]switchme$", RegexOptions.IgnoreCase).Success) { // team switch command if (EnableSwitchmeCmd) { if (plugin.GetReservedSlotsList().Contains(player.Name)) { plugin.ServerCommand("admin.movePlayer", player.Name, server.OppositeTeamId(player.TeamId).ToString(), "0", "true"); } else { tmp_SendMsg = true; } } } // send message based on player language if (tmp_SendMsg) { if ((player.CountryCode == "br") || (player.CountryCode == "pt")) { // message for brasil, portugal plugin.SendPlayerMessage(player.Name, plugin.R("So para VIPs")); plugin.PRoConChat("PlayerSay " + player.Name + ") So para VIPs"); } else { // default message plugin.SendPlayerMessage(player.Name, plugin.R("Sorry, this command is for !VIP SLOT players only")); plugin.PRoConChat("PlayerSay " + player.Name + ") Sorry, this command is for !VIP SLOT players only"); } } i test it it not work its work not need anything , sorry Link to comment
B7ackhawk Posted November 16, 2019 Share Posted November 16, 2019 Hello there is there code , if player wanna know next map type !next map Link to comment
Plugin Developer maxdralle Posted November 16, 2019 Plugin Developer Share Posted November 16, 2019 @dev007 i think the command !nextmap is a part of the xvotemap plugin: https://myrcon.net/topic/160-xvotemap-1560/ otherwise you can do it with insane limits: ///////////////////////////////// // !nextmap ///////////////////////////////// // info > settings for insane limits: limit_evaluation: OnAnyChat ; limit_first_check: Code ; limit_action: none if ((player.LastChat).Length < 1) { return false; } if (Regex.Match(player.LastChat, @"!next|nextmap|next map|!map", RegexOptions.IgnoreCase).Success) { plugin.SendGlobalMessage("!NEXT map: " + plugin.FriendlyMapName(server.NextMapFileName)); plugin.PRoConChat("!NEXT map: " + plugin.FriendlyMapName(server.NextMapFileName)); } Link to comment
B7ackhawk Posted November 17, 2019 Share Posted November 17, 2019 @dev007 i think the command !nextmap is a part of the xvotemap plugin: https://myrcon.net/topic/160-xvotemap-1560/ otherwise you can do it with insane limits: ///////////////////////////////// // !nextmap ///////////////////////////////// // info > settings for insane limits: limit_evaluation: OnAnyChat ; limit_first_check: Code ; limit_action: none if ((player.LastChat).Length < 1) { return false; } if (Regex.Match(player.LastChat, @"!next|nextmap|next map|!map", RegexOptions.IgnoreCase).Success) { plugin.SendGlobalMessage("!NEXT map: " + plugin.FriendlyMapName(server.NextMapFileName)); plugin.PRoConChat("!NEXT map: " + plugin.FriendlyMapName(server.NextMapFileName)); } yup sir it work 100% thank you last what i need , there was code i was used with insane limits: for game mode counter , i need code for CQ maps Link to comment
Uninstaller Posted November 17, 2019 Share Posted November 17, 2019 Hi, is it possible to enable/disable others plugins with an insane limits script?Because i'm trying to do a script for that and my the script is compilled by insane limits and working but it doesnt disable/enable the plugin plugin.ServerCommand("procon.plugin.enable", "CAdaptiveTicketCount", "false"); When i enter this command directly in the procon console it work, the plugin is desactived, but with my script, nothing happen procon.plugin.enable CAdaptiveTicketCount false Link to comment
B7ackhawk Posted November 20, 2019 Share Posted November 20, 2019 Hello i need code game mode counter when start server you need change game mode counter from 100 for 200 i was have code only restart server it bee 200% Link to comment
B7ackhawk Posted November 28, 2019 Share Posted November 28, 2019 Hello i have problem https://prnt.sc/q37key the code for !next map it working when i off the votemap plugin but if i run it the code give error i run procon v1.5.2.1 its look like votemap plugin kill the code any idea ? Link to comment
B7ackhawk Posted December 18, 2019 Share Posted December 18, 2019 Hello guys can someone give me code for block explosive from metro and locker i can't find it Link to comment
Plugin Developer ColColonCleaner Posted December 18, 2019 Plugin Developer Share Posted December 18, 2019 Hello guys can someone give me code for block explosive from metro and locker i can't find it You already have AdKats installed, you can just enable the explosives limiter on that. Link to comment
masterjj Posted December 20, 2019 Share Posted December 20, 2019 Hi Is there anyway to avoid jet spawn or if anyone spawn in jet kill him.. ? (map dawn braker) Link to comment
Skillmanonline Posted March 2, 2020 Share Posted March 2, 2020 Can someone help me make a very simple code. When player request !rules it is shown in his chat. I just have a few rules some please help with clear explanations Thanks Link to comment
Plugin Developer ColColonCleaner Posted March 2, 2020 Plugin Developer Share Posted March 2, 2020 30 minutes ago, Skillmanonline said: Can someone help me make a very simple code. When player request !rules it is shown in his chat. I just have a few rules some please help with clear explanations Thanks I don't remember the IL syntax off the top of my head so if nobody else responds you could just use the 'server rules on request' plugin. You can find the download in the old plugin zips thread. Link to comment
Skillmanonline Posted March 2, 2020 Share Posted March 2, 2020 34 minutes ago, ColColonCleaner said: I don't remember the IL syntax off the top of my head so if nobody else responds you could just use the 'server rules on request' plugin. You can find the download in the old plugin zips thread. Thank you so much! your own post still had all the working plugins Thanks again been going at it for hours (because i am a noob but still) Link to comment
maddog Posted April 2, 2020 Share Posted April 2, 2020 On 2/12/2019 at 8:56 AM, ImportBot said: Originally Posted by xloneshadowx*: Can someone tell me why this is not working for the map Flood Zone and the little bird You get this code fixed, i am looking for something for hardline too Link to comment
Skillmanonline Posted April 13, 2020 Share Posted April 13, 2020 Anyone have a list of weapon code names, like the file name ? Thanks Link to comment
anthdawg5443 Posted March 14, 2021 Share Posted March 14, 2021 So im looking into having maybe a vote to change the gamemode in my server and have it load all the maps for said gamemode before the votemap comes in so they can still vote for whatever map they want how feasable is that? i think it is possible just dont know how much overhead it would put on my procon layer Thanks in advance Link to comment
nexxithd Posted June 18, 2021 Share Posted June 18, 2021 Heyo guys, im looking for a limit like the Metro/Locker No Explosives one, just for the Anti Air Vehicles tunguska, lad-25 and the pgz95. I tried to rewrite the metro no explosives for aa but it wont work sadly. Does anyone has help? i cant compile my version Link to comment
AndreSpecker Posted June 25, 2021 Share Posted June 25, 2021 Does anyone have a code to kick everyone who is not from "XX" country? Link to comment
Lyzz Posted July 21, 2021 Share Posted July 21, 2021 i want to do some action if someone kills with a heli or jet this is my code so far. but it never triggers if(kill.Weapon.Contains("Z-11W")){return true;} Link to comment
Hedius Posted July 27, 2021 Share Posted July 27, 2021 On 7/21/2021 at 9:08 PM, Lyzz said: i want to do some action if someone kills with a heli or jet this is my code so far. but it never triggers if(kill.Weapon.Contains("Z-11W")){return true;} Vehicle kills do not show up as a weapon. (You will have to look at VehicleDetails/Name etc. Use the KillReasonInterface for this: public interface KillReasonInterface { String Name { get; } // weapon name or reason, like Suicide String Detail { get; } // BF4: ammo or attachment String AttachedTo { get; } // BF4: main weapon when Name is a secondary attachment, like M320 String VehicleName { get; } // BF4: if Name is Death, this is the vehicle's name String VehicleDetail { get; } // BF4: if Name is Death, this is the vehicle's detail (stuff after final slash) } How to get to it: (method of plugin) KillReasonInterface FriendlyWeaponName(String killWeapon); // BF3 example: "Weapons/XP2_L86/L86" => KillReasonInterface("L86", null, null) // BF4 example: "U_AK12_M320_HE" => KillReasonInterface("M320", "HE", "AK12") // BF4 vehicle example: "Gameplay/Vehicles/AH6/AH6_Littlebird" => KillReasonInterface("Death", null, null, "AH6", "AH6_Littlebird") KillReasonInterface x = plugin.FriendlyWeapnName(kill.Weapon); Need new plugin features? I can change: Adkats, AdKatsLRT, LanguageEnforcer, InsaneLimits, xVotemap for you. Also working on new plugins. Have an idea? Share it and I might include it in my repos. Github.com/hedius Check out E4GLAdKats for an advancded and maintained AdKats version. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.