Results 1 to 7 of 7
  1. #1

    Hexagon code need help

    // Revision : 5 // action taken on damage modifiers Action<String> DamageModifierPlayer = delegate(String who) { // set action here default is 1 hour ban String message = "you have been banned for having suscpicious stats"; plugin.EABanPlayerWithMessage(EABanType.EA_GUID, EABanDuration.Temporary, who, 60, message); }; // action taken for blackpoint violaters Action<String> BlackPointPlayer = delegate(String who) { // set action here default is 1 hour ban String message = "you have been banned for having suscpicious stats"; plugin.EABanPlayerWithMessage(EABanType.EA_GUID, EABanDuration.Temporary, who, 60, message); }; // how many black points are required for the action to be taken int TakeAction = 20; // recommended is 20 and above Minimum is 20 // how many black points are required for notification to trigger int NotifyMe = 5; // recommended above 5 and below TakeAction value // here you can setup a notification Action<String> NotifyMeAbout = delegate(String who) { // set notification here, such as email,sound notification, taskbar notification, logging etc .. // this is triggered for all players who have Black points above the NotifyMe value plugin.Log("Cheat-o-meter.log", plugin.R("[%date% %time%] [%server_host%] [server.Name] [player.EAGuid] " + who)); // this will log player name only with his EA GUID, still require testing }; // options END if (limit.Activations(player.Name) != 1) return false; if ( (player.Time/60)/60 < 15) return false; Dictionary<String,double> avg_HK = new Dictionary<String,double>(); // PDW avg_HK["AS VAL"] = 14.83; avg_HK["Weapons/XP2_MP5K/MP5K"] = 13.72; avg_HK["MP7"] = 13.01; avg_HK["Weapons/P90/P90"] = 13.05; avg_HK["Weapons/MagpulPDR/MagpulPDR"] = 15.81; avg_HK["PP-19"] = 11.51; avg_HK["PP-2000"] = 15.45; avg_HK["Weapons/UMP45/UMP45"] = 16.03; // Engineer avg_HK["Weapons/A91/A91"] = 16.36; avg_HK["Weapons/XP2_ACR/ACR"] = 13.62; avg_HK["AKS-74u"] = 16.46; avg_HK["Weapons/G36C/G36C"] = 16.38; avg_HK["HK53"] = 16.58; avg_HK["M4A1"] = 16; avg_HK["Weapons/XP2_MTAR/MTAR"] = 16.96; avg_HK["QBZ-95B"] = 16.22; avg_HK["Weapons/SCAR-H/SCAR-H"] = 19.82; avg_HK["SG 553 LB"] = 16.43; // Assault avg_HK["AEK-971"] = 16.52; avg_HK["Weapons/AK74M/AK74"] = 16.44; avg_HK["AN-94 Abakan"] = 16.04; avg_HK["Steyr AUG"] = 16.63; avg_HK["F2000"] = 17.00; avg_HK["FAMAS"] = 16.8; avg_HK["Weapons/G3A3/G3A3"] = 21.46; avg_HK["Weapons/KH2002/KH2002"] = 16.61; avg_HK["Weapons/XP1_L85A2/L85A2"] = 16.49; avg_HK["M16A4"] = 15.98; avg_HK["Weapons/M416/M416"] = 16.68; avg_HK["SCAR-L"] = 16.53; //Support avg_HK["M27IAR"] = 16.32; avg_HK["RPK-74M"] = 16.04; avg_HK["Weapons/XP2_L86/L86"] = 16.25; avg_HK["LSAT"] = 16.17; avg_HK["M60"] = 19.98; avg_HK["M240"] = 20.09; avg_HK["M249"] = 16.16; avg_HK["MG36"] = 16.44; avg_HK["Pecheneg"] = 20.93; avg_HK["QBB-95"] = 16.31; avg_HK["Type88"] = 15.59; // Recon avg_HK["JNG90"] = 52.62; avg_HK["L96"] = 50.54; avg_HK["M39"] = 31.87; avg_HK["M40A5"] = 52.13; avg_HK["Model98B"] = 52.81; avg_HK["M417"] = 32.76; avg_HK["Mk11"] = 31.4; avg_HK["QBU-88"] = 33.03; avg_HK["SKS"] = 25.55; avg_HK["SV98"] = 48.03; avg_HK["SVD"] = 32.06; // Pistols avg_HK["Glock18"] = 18.43; avg_HK["M1911"] = 25.02; avg_HK["M9"] = 17.89; avg_HK["M93R"] = 18.5; avg_HK["Taurus .44"] = 38.66; avg_HK["Weapons/MP412Rex/MP412REX"] = 35.13; avg_HK["Weapons/MP443/MP443"] = 18.58; Dictionary<String,double> norm_DPS = new Dictionary<String,double>(); // PDW norm_DPS["AS VAL"] = 20; norm_DPS["Weapons/XP2_MP5K/MP5K"] = 25; norm_DPS["MP7"] = 20; norm_DPS["Weapons/P90/P90"] = 20; norm_DPS["Weapons/MagpulPDR/MagpulPDR"] = 25; norm_DPS["PP-19"] = 16.7; norm_DPS["PP-2000"] = 25; norm_DPS["Weapons/UMP45/UMP45"] = 34; // Engineer norm_DPS["Weapons/A91/A91"] = 25; norm_DPS["Weapons/XP2_ACR/ACR"] = 20; norm_DPS["AKS-74u"] = 25; norm_DPS["Weapons/G36C/G36C"] = 25; norm_DPS["HK53"] = 25; norm_DPS["M4A1"] = 25; norm_DPS["Weapons/XP2_MTAR/MTAR"] = 25; norm_DPS["QBZ-95B"] = 25; norm_DPS["Weapons/SCAR-H/SCAR-H"] = 30; norm_DPS["SG 553 LB"] = 25; // Assault norm_DPS["AEK-971"] = 25; norm_DPS["Weapons/AK74M/AK74"] = 25; norm_DPS["AN-94 Abakan"] = 25; norm_DPS["Steyr AUG"] = 25; norm_DPS["F2000"] = 25; norm_DPS["FAMAS"] = 25; norm_DPS["Weapons/G3A3/G3A3"] = 34; norm_DPS["Weapons/KH2002/KH2002"] = 25; norm_DPS["Weapons/XP1_L85A2/L85A2"] = 25; norm_DPS["M16A4"] = 25; norm_DPS["Weapons/M416/M416"] = 25; norm_DPS["SCAR-L"] = 25; //Support norm_DPS["M27IAR"] = 25; norm_DPS["RPK-74M"] = 25; norm_DPS["Weapons/XP2_L86/L86"] = 25; norm_DPS["LSAT"] = 25; norm_DPS["M60"] = 34; norm_DPS["M240"] = 34; norm_DPS["M249"] = 25; norm_DPS["MG36"] = 25; norm_DPS["Pecheneg"] = 34; norm_DPS["QBB-95"] = 25; norm_DPS["Type88"] = 25; // Recon norm_DPS["JNG90"] = 80; norm_DPS["L96"] = 80; norm_DPS["M39"] = 50; norm_DPS["M40A5"] = 80; norm_DPS["Model98B"] = 95; norm_DPS["M417"] = 50; norm_DPS["Mk11"] = 50; norm_DPS["QBU-88"] = 50; norm_DPS["SKS"] = 43; norm_DPS["SV98"] = 80; norm_DPS["SVD"] = 50; // Pistols norm_DPS["Glock18"] = 25; norm_DPS["M1911"] = 34; norm_DPS["M9"] = 25; norm_DPS["M93R"] = 20; norm_DPS["Taurus .44"] = 60; norm_DPS["Weapons/MP412Rex/MP412REX"] = 50; norm_DPS["Weapons/MP443/MP443"] = 25; List<String> cheatometer = new List<String>(); BattlelogWeaponStatsInterface Get = null; String DPSCOLOR = "^2"; String HSKCOLOR = "^2"; String KPMCOLOR = "^2"; String ACCCOLOR = "^2"; String BPCOLOR = "^2"; String BlackPointsCounter= player.Name + "_Weapon_BlackPoints"; String cheatedCounter= player.Name + "_Weapon_cheated"; String DPSmodifier = null; int BlackPoints = 0; int cheated = 0; if (TakeAction < 20) TakeAction = 20; if (NotifyMe >= TakeAction) NotifyMe = TakeAction-1; foreach (String Gun in avg_HK.Keys) { Get = player.GetBattlelog(Gun); if (Get.Kills < 120) continue; Match m = Regex.Match(Gun, @"/([^/]+)$"); String wn = Gun; if (m.Success) wn = m.Groups[1].Value; DPSCOLOR = "^2"; HSKCOLOR = "^2"; KPMCOLOR = "^2"; ACCCOLOR = "^2"; double HSmodifier = 1; if (avg_HK[Gun] > 25) HSmodifier = 1.2; double ShotsHit = Math.Round((Get.ShotsFired*(Get.Accuracy / 100)), 0); double DPS = Math.Round(((Get.Kills/ShotsHit)*100), 2); double HeadshotsRatio = Math.Round(((Get.Headshots/Get.Kills)*100), 2); double HSmodified = Math.Round(HeadshotsRatio * HSmodifier, 2); double MaxDPS = Math.Round((norm_DPS[Gun] * (1+(HSmodified/100))), 0); double KPM = Math.Round(Get.Kills/(Get.TimeEquipped/60), 1); double Accuracy = Math.Round(Get.Accuracy, 0); if (DPS > (MaxDPS * 1.3) && DPS <= (MaxDPS * 1.4)) { DPSCOLOR = "^3"; server.Data.setInt(BlackPointsCounter, BlackPoints+1); if (server.Data.issetInt(BlackPointsCounter)) BlackPoints = server.Data.getInt(BlackPointsCounter); } if (DPS > (MaxDPS * 1.4) && DPS <= (MaxDPS * 1.8)) { DPSCOLOR = "^7"; server.Data.setInt(BlackPointsCounter, BlackPoints+3); if (server.Data.issetInt(BlackPointsCounter)) BlackPoints = server.Data.getInt(BlackPointsCounter); } if (DPS > (MaxDPS * 1.8)) { DPSCOLOR = "^8"; server.Data.setInt(cheatedCounter, 1); } if (avg_HK[Gun] <= 25) { if (DPS <= (MaxDPS * 1.3) && HeadshotsRatio < 40 && ( (KPM <= 3.5 && player.Rank <= 120) || (KPM <= 4 && player.Rank > 120) ) && Accuracy <= 35) continue; if (HeadshotsRatio >= 40 && HeadshotsRatio <= 45) { HSKCOLOR = "^3"; server.Data.setInt(BlackPointsCounter, BlackPoints+2); if (server.Data.issetInt(BlackPointsCounter)) BlackPoints = server.Data.getInt(BlackPointsCounter); } if (HeadshotsRatio > 45 && HeadshotsRatio <=55) { HSKCOLOR = "^7"; server.Data.setInt(BlackPointsCounter, BlackPoints+3); if (server.Data.issetInt(BlackPointsCounter)) BlackPoints = server.Data.getInt(BlackPointsCounter); } if (HeadshotsRatio > 55) { HSKCOLOR = "^8"; server.Data.setInt(BlackPointsCounter, BlackPoints+5); if (server.Data.issetInt(BlackPointsCounter)) BlackPoints = server.Data.getInt(BlackPointsCounter); } if (Accuracy > 35 && Accuracy <= 40) { ACCCOLOR = "^3"; server.Data.setInt(BlackPointsCounter, BlackPoints+1); if (server.Data.issetInt(BlackPointsCounter)) BlackPoints = server.Data.getInt(BlackPointsCounter); } if (Accuracy > 40 && Accuracy <= 50) { ACCCOLOR = "^7"; server.Data.setInt(BlackPointsCounter, BlackPoints+2); if (server.Data.issetInt(BlackPointsCounter)) BlackPoints = server.Data.getInt(BlackPointsCounter); } if (Accuracy > 50) { ACCCOLOR = "^8"; server.Data.setInt(BlackPointsCounter, BlackPoints+3); if (server.Data.issetInt(BlackPointsCounter)) BlackPoints = server.Data.getInt(BlackPointsCounter); } } if (avg_HK[Gun] > 25) { if (DPS <= (MaxDPS * 1.3) && HeadshotsRatio < 90 && ( (KPM <= 3.5 && player.Rank <= 120) || (KPM <= 4 && player.Rank > 120) ) && Accuracy <= 50) continue; if (HeadshotsRatio >= 90 && HeadshotsRatio <= 93) { HSKCOLOR = "^3"; server.Data.setInt(BlackPointsCounter, BlackPoints+1); if (server.Data.issetInt(BlackPointsCounter)) BlackPoints = server.Data.getInt(BlackPointsCounter); } if (HeadshotsRatio > 93 && HeadshotsRatio <=96) { HSKCOLOR = "^7"; server.Data.setInt(BlackPointsCounter, BlackPoints+2); if (server.Data.issetInt(BlackPointsCounter)) BlackPoints = server.Data.getInt(BlackPointsCounter); } if (HeadshotsRatio > 96) { HSKCOLOR = "^8"; server.Data.setInt(BlackPointsCounter, BlackPoints+3); if (server.Data.issetInt(BlackPointsCounter)) BlackPoints = server.Data.getInt(BlackPointsCounter); } if (Accuracy > 50 && Accuracy <= 60) { ACCCOLOR = "^3"; server.Data.setInt(BlackPointsCounter, BlackPoints+1); if (server.Data.issetInt(BlackPointsCounter)) BlackPoints = server.Data.getInt(BlackPointsCounter); } if (Accuracy > 60 && Accuracy <= 70) { ACCCOLOR = "^7"; server.Data.setInt(BlackPointsCounter, BlackPoints+2); if (server.Data.issetInt(BlackPointsCounter)) BlackPoints = server.Data.getInt(BlackPointsCounter); } if (Accuracy > 70) { ACCCOLOR = "^8"; server.Data.setInt(BlackPointsCounter, BlackPoints+3); if (server.Data.issetInt(BlackPointsCounter)) BlackPoints = server.Data.getInt(BlackPointsCounter); } } if (KPM > 3.5 && KPM <= 4.5) { KPMCOLOR = "^3"; if (player.Rank <= 120) server.Data.setInt(BlackPointsCounter, BlackPoints+1); if (player.Rank > 120 && KPM > 4) server.Data.setInt(BlackPointsCounter, BlackPoints+1); if (server.Data.issetInt(BlackPointsCounter)) BlackPoints = server.Data.getInt(BlackPointsCounter); } if (KPM > 4.5 && KPM <= 5.5) { KPMCOLOR = "^7"; if (player.Rank <= 120) server.Data.setInt(BlackPointsCounter, BlackPoints+2); if (player.Rank > 120) server.Data.setInt(BlackPointsCounter, BlackPoints+1); if (server.Data.issetInt(BlackPointsCounter)) BlackPoints = server.Data.getInt(BlackPointsCounter); } if (KPM > 5.5) { KPMCOLOR = "^8"; if (player.Rank <= 120) server.Data.setInt(BlackPointsCounter, BlackPoints+3); if (player.Rank > 120) server.Data.setInt(BlackPointsCounter, BlackPoints+2); if (server.Data.issetInt(BlackPointsCounter)) BlackPoints = server.Data.getInt(BlackPointsCounter); } cheatometer.Add("^b[" + wn+ "] " + DPSCOLOR + "DPS : " + DPS + "/" + norm_DPS[Gun] + "-" + MaxDPS + " ^0|" + HSKCOLOR + " Headshot/Kill : " + HeadshotsRatio + "% ^0|" + KPMCOLOR + " Kills/minute : " + KPM + " ^0|" + ACCCOLOR + " Accuracy : " + Accuracy + "% ^0| Kills : " + Get.Kills + "^0^n"); } if (cheatometer.Count == 0) return false; if (server.Data.issetInt(BlackPointsCounter)) BlackPoints = server.Data.getInt(BlackPointsCounter); if (server.Data.issetInt(cheatedCounter)) cheated = server.Data.getInt(cheatedCounter); plugin.PRoConChat("--------------------------------------------------" + player.Name + "--------------------------------------------------"); plugin.PRoConChat("^b^2Green = normal/fine ^0| ^3Yellow = above normal ^0| ^7Pink = highly suspicious ^0 | ^8Red = 99% cheat^n^0"); foreach (String metered in cheatometer) { plugin.PRoConChat(metered); } if (cheated == 1) { DamageModifierPlayer(player.Name); DPSmodifier = " ^8^b, player is damage modifier and is banned^0^n"; } if (BlackPoints >= 1) { // add any action for notifying. plugin.ConsoleWrite("^3^b[Evaluating]^0^n " + player.Name + " has " + BlackPoints + " Black Points"); if (BlackPoints > 5 && BlackPoints <= 10) BPCOLOR = "^3"; if (BlackPoints > 10 && BlackPoints <= 15) BPCOLOR = "^7"; if (BlackPoints > 15) BPCOLOR = "^8"; if (BlackPoints >= TakeAction && cheated == 0) { BlackPointPlayer(player.Name); } if (BlackPoints <= 15 && cheated >= 0) plugin.PRoConChat(player.Name + " has " + BPCOLOR + BlackPoints + "^0^n black points" + DPSmodifier); if (BlackPoints > 15 && BlackPoints < TakeAction && cheated == 1) plugin.PRoConChat(player.Name + " has " + BPCOLOR + BlackPoints + "^0^n black points" + DPSmodifier); if (BlackPoints > 15 && BlackPoints < TakeAction && cheated == 0) plugin.PRoConChat(player.Name + " has " + BPCOLOR + BlackPoints + "^0^n black points, please investigate the player."); if (BlackPoints >= TakeAction && cheated == 1) plugin.PRoConChat(player.Name + " has " + BPCOLOR + BlackPoints + "^0^n black points" + DPSmodifier); if (BlackPoints >= TakeAction && cheated == 0) plugin.PRoConChat(player.Name + " has " + BPCOLOR + BlackPoints + " black points and is banned"); plugin.SendTaskbarNotification("warning", "cheatmeter"); } if (BlackPoints >= NotifyMe) { NotifyMeAbout(player.Name); plugin.Log("cheat-o-meter.log", "--------------------------------------------------" + player.Name + "--------------------------------------------------"); foreach (String metered in cheatometer) { plugin.Log("cheat-o-meter.log", metered); } } return false;


    I had set just like hexagon say:use_direct_fetch and use_slow_weapon_stats
    All works okey,but messages in procon chat not shows so all player can see.Insanelimits not shows messages
    What shall i do so all works to 100%??Blaze

  2. #2
    Plugin Developer
    Join Date
    Jan 2012
    Location
    Saarland
    Posts
    913
    No one can read this code below without formation and I guess no one really knows what you want.

    Sorry to say but you really need to improve your posts if you want some help. Same goes for the other threads as well. I can't help as long as I don't understand your posts.
    64 slots mixed Classic mode BF4
    32 slots rush mode BF3

  3. #3
    LumPen whats your problem? Most strange guy really.I had tell whats problem are, you are not fool or
    stupid? If you dont understand this easy things?How most people write in forum so you understand?
    So read again i tell you exatcly what problem are.And i not a coder so sorry if code not are good in forum.

  4. #4
    "I was a genuinely nice person before I joined this community"
    Join Date
    May 2010
    Location
    Austria
    Posts
    3,269
    Quote Originally Posted by Blaze0075 View Post
    LumPen whats your problem? Most strange guy really.I had tell whats problem are, you are not fool or
    stupid? If you dont understand this easy things?How most people write in forum so you understand?
    So read again i tell you exatcly what problem are.And i not a coder so sorry if code not are good in forum.
    Please refrain from insults, consider this your final warning.

    Furthermore:

    1) At least use the [QUOTE ] or [CODE ] tags when posting your code (or throw it on https://gist.github.com). Your first post is absolutely unreadable and no one can get anything useful out of it unless they take extra steps to format it, clean it up and then try to figure out what's wrong
    2) Please rephrase your actual question. As LumPenPack said, it's not very clear what you're actually asking...
    I had set just like hexagon say:use_direct_fetch and use_slow_weapon_stats

    Uh, what?
    All works okey,but messages in procon chat not shows so all player can see.Insanelimits not shows messages

    I'm guessing you're trying to say that Insane Limits doesn't send any messages to the ingame chat and that's your actual problem?


    Before posting: Have you read the MANUAL?
    Before posting: Have you used the SEARCH?

    I will not provide support through PMs or TeamSpeak. Please post your questions in our forums.


  5. #5
    I'm pretty sure he means HexaCanon, and no, the irony is not lost on me.
    Don't send me private messages (PMs) unless you really need privacy, like your game server password. If you just have a question or need help, post in one of the threads. It's extra work for me to answer questions and give help in private messages and no one else gets the benefit of the answer.

  6. #6
    Exactly morpheus inssnelimits not works in ingame.Uh what! Means that code is activated and check
    players fine, but not ingame like hexagon says this works in ingame procon chat.And question 2 settings
    use_fetch and use_slow i mean this options most set true to works.(hexagon say)That i mean ihope you understand
    now what i mean? Can i send this ingame or not? Thats my new question hu hu hu hu

  7. #7
    What he is showing is Hex's Cheat Detector code .
    not sure if it is the Normal or HardCore version. I use the Hardcore version, but do not have a revision#, Hexacanon did the HC version by request.

    NOTE: If he is trying to use the HardCore version on a Normal Server, the detector may not ever be triggered.

    NOTE: If he is trying to use the Normal Version on a HardCore Server and has mostly Hardcore Players, he will empty out his server.

    I am a Hardcore Only player, I have 0 BlackPoints on my HC Server, If I use Normal Version I have 23 Black Points and I am added to ban list.

    Hex's Cheat Detector does not show any messages in in-game chat window. Should not be a problem as it is working as Hexacanon intended.

    There is an entry in procon chat window for all Players with any Black Points and a log file is written for players having over 5 Black Points along with 60 minute EA ban for players over 20 Black Points.

    thx

    _gp_
    Last edited by _gp_; 28-12-2014 at 08:09. Reason: always a thought

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •