Promoveaza serverul
Black Friday Se termina in 50% reducere la un loc in Master Server si la lista Client, care vine cu PREMIUM PE VIATA
01 Zile 03 Ore 20 Min 41 Sec
Vezi ofertele

Initial release 1.0.0

Browse Source
1.0.0 - Initial release.
Daemon666 committed commit 2d07a92bddcea972e1e4044a178e0432fb1096be
4 changed files with 153 additions and 0 deletions
+3 -0 CHANGELOG.md A
@@ -0,0 +1,3 @@
1 +## 1.0.0 (2025-09-03)
2 +
3 +1.0.0 - Initial release.
+1 -0 README.md A
@@ -0,0 +1 @@
1 +<p><strong>CSB Bhop Script Detection</strong> separates a good hopper from a scripter by looking at <em>when</em> the jump happens, not how far it goes. In <code>PlayerPreThink</code> it watches the <code>FL_ONGROUND</code> flag and the <code>+jump</code> button: a bunnyhop script re-presses jump on the very first ground frame every single time, which a human simply cannot do. A long run of these frame-perfect jumps is logged and optionally punished.</p><h2>How it works</h2><ul><li>Tracks the ground/air transition each frame and counts frames spent on the ground.</li><li>Only the rising edge of <code>+jump</code> is counted, so holding jump isn't misread.</li><li>A jump on ground-frame 0 or 1 is "perfect"; a normal jump resets the streak.</li><li><code>csb_bhop_perfect</code> consecutive perfect jumps triggers a log line and, if <code>csb_bhop_action 1</code>, a kick.</li></ul><h2>Installation</h2><ol><li>Enable the <code>fakemeta</code> module in <code>modules.ini</code>.</li><li>Compile <code>csb_bhop_detect.sma</code>, copy it to <code>addons/amxmodx/plugins/</code> and add it to <code>plugins.ini</code>.</li><li>Change the map.</li></ol>
+108 -0 addons/amxmodx/scripting/csb_bhop_detect.sma A
@@ -0,0 +1,108 @@
1 +/*
2 + * CSB Bhop Script Detection
3 + * Copyright (C) 2026 counter-strike-boost.com
4 + *
5 + * Flags scripted bunnyhopping by watching FL_ONGROUND transitions and +jump
6 + * presses in PlayerPreThink: a run of frame-perfect jumps (jumping on the
7 + * first ground frame every time) is not humanly repeatable, so it is logged.
8 + *
9 + * This program is free software: you can redistribute it and/or modify it under
10 + * the terms of the GNU General Public License as published by the Free Software
11 + * Foundation, either version 3 of the License, or (at your option) any later
12 + * version. It is distributed in the hope that it will be useful, but WITHOUT
13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 + * FOR A PARTICULAR PURPOSE. See <https://www.gnu.org/licenses/> for details.
15 + */
16 +
17 +#include <amxmodx>
18 +#include <fakemeta>
19 +
20 +new const PLUGIN[] = "CSB Bhop Script Detection"
21 +new const VERSION[] = "1.0.0"
22 +new const AUTHOR[] = "counter-strike-boost.com"
23 +
24 +new g_pEnabled, g_pPerfect, g_pAction
25 +
26 +new bool:g_bOnGround[33]
27 +new bool:g_bJumpHeld[33]
28 +new g_iGroundFrames[33]
29 +new g_iPerfect[33]
30 +
31 +public plugin_init()
32 +{
33 + register_plugin(PLUGIN, VERSION, AUTHOR)
34 +
35 + g_pEnabled = register_cvar("csb_bhop_enabled", "1")
36 + g_pPerfect = register_cvar("csb_bhop_perfect", "12")
37 + g_pAction = register_cvar("csb_bhop_action", "0")
38 +
39 + register_forward(FM_PlayerPreThink, "fwPreThink")
40 +}
41 +
42 +public client_putinserver(id)
43 +{
44 + g_bOnGround[id] = false
45 + g_bJumpHeld[id] = false
46 + g_iGroundFrames[id] = 0
47 + g_iPerfect[id] = 0
48 +}
49 +
50 +public fwPreThink(id)
51 +{
52 + if (!get_pcvar_num(g_pEnabled) || !is_user_alive(id) || is_user_bot(id))
53 + return FMRES_IGNORED
54 +
55 + new bool:onGround = (pev(id, pev_flags) & FL_ONGROUND) != 0
56 + new bool:jump = (pev(id, pev_button) & IN_JUMP) != 0
57 +
58 + if (onGround)
59 + {
60 + // count how long we've been standing since we landed
61 + if (!g_bOnGround[id])
62 + g_iGroundFrames[id] = 0
63 + else
64 + g_iGroundFrames[id]++
65 +
66 + // rising edge of the jump button while grounded
67 + if (jump && !g_bJumpHeld[id])
68 + {
69 + if (g_iGroundFrames[id] <= 1)
70 + {
71 + g_iPerfect[id]++
72 +
73 + if (g_iPerfect[id] >= get_pcvar_num(g_pPerfect))
74 + flag(id)
75 + }
76 + else
77 + {
78 + g_iPerfect[id] = 0
79 + }
80 + }
81 + }
82 +
83 + g_bOnGround[id] = onGround
84 + g_bJumpHeld[id] = jump
85 +
86 + return FMRES_IGNORED
87 +}
88 +
89 +flag(id)
90 +{
91 + g_iPerfect[id] = 0
92 +
93 + new name[32], authid[35]
94 + get_user_name(id, name, charsmax(name))
95 + get_user_authid(id, authid, charsmax(authid))
96 +
97 + log_amx("[CSB Bhop] frame-perfect bunnyhop pattern from %s <%s>", name, authid)
98 +
99 + if (get_pcvar_num(g_pAction) == 1)
100 + {
101 + server_cmd("kick #%d ^"CSB: scripted bunnyhopping^"", get_user_userid(id))
102 + server_exec()
103 + }
104 + else
105 + {
106 + client_print(0, print_chat, "[CSB] %s is suspected of scripted bunnyhopping.", name)
107 + }
108 +}
+41 -0 csb.json A
@@ -0,0 +1,41 @@
1 +{
2 + "name": "CSB Bhop Script Detection",
3 + "category": "anticheat",
4 + "tags": "bhop, script, detection",
5 + "image": "",
6 + "original_author": "",
7 + "original_url": "",
8 + "license": "GPL-3.0",
9 + "title": "CSB Bhop Script Detection",
10 + "short_desc": "Flags scripted bunnyhopping from a run of frame-perfect jumps that no human can repeat by hand.",
11 + "version": "1.0.0",
12 + "amxx_min": "1.9",
13 + "amxx_compile_default": "1.9",
14 + "rehlds_ok": true,
15 + "hlds_ok": true,
16 + "regamedll_required": false,
17 + "metamod_flavor": "any",
18 + "reapi_required": false,
19 + "modules": "fakemeta",
20 + "install_notes": "1. Enable the fakemeta module in addons/amxmodx/configs/modules.ini\n2. Put csb_bhop_detect.amxx in addons/amxmodx/plugins/ and add it to plugins.ini\n3. Change map",
21 + "known_conflicts": "On servers with a legit auto-bhop plugin every jump is frame-perfect, so disable this or raise the threshold.",
22 + "cvars": [
23 + {
24 + "name": "csb_bhop_enabled",
25 + "default": "1",
26 + "description": "Enable detection."
27 + },
28 + {
29 + "name": "csb_bhop_perfect",
30 + "default": "12",
31 + "description": "Consecutive frame-perfect jumps before flagging."
32 + },
33 + {
34 + "name": "csb_bhop_action",
35 + "default": "0",
36 + "description": "0 = log + announce, 1 = kick."
37 + }
38 + ],
39 + "commands": [],
40 + "main": "addons/amxmodx/scripting/csb_bhop_detect.sma"
41 +}
0 42