Promuj serwer

Initial release 1.0.0

Browse Source
1.0.0 - Initial release.
Daemon666 committed commit 245ebf5d9458774941bfe30fd39be9e094a5b2a9
4 changed files with 166 additions and 0 deletions
+3 -0 CHANGELOG.md A
@@ -0,0 +1,3 @@
1 +## 1.0.0 (2025-07-12)
2 +
3 +1.0.0 - Initial release.
+1 -0 README.md A
@@ -0,0 +1 @@
1 +<p><strong>CSB Wallhack Blocker</strong> defeats most wallhacks and ESP tools by never sending an enemy's position to a client that should not be able to see it. In <code>FM_AddToFullPack</code> the plugin evaluates, for every viewer/enemy pair, whether the enemy is inside the viewer's PVS and whether a traceline from the viewer's eyes reaches the enemy's centre or head. If there is no clear sight line, the enemy is dropped from that client's packet.</p><p>To avoid making legitimate play feel wrong, teammates are always visible and an enemy who has fired within a short grace window is always shown (their position is already given away by the shot).</p><p>Inspired by the classic <code>AddToFullPack</code> wall-blocker technique (Fysiks / OrangeBox). Independent GPL re-implementation.</p><h2>Features</h2><ul><li>PVS check plus dual traceline (body + head) per viewer.</li><li>Fire-grace window keeps recently-shooting enemies visible.</li><li>Teammates never hidden; only living enemy players are filtered.</li><li>Everything is server-side; clients need no changes.</li></ul><h2>Installation</h2><ol><li>Enable the <code>fakemeta</code> module in <code>addons/amxmodx/configs/modules.ini</code>.</li><li>Compile <code>csb_wallhack_blocker.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><p>On very high-population servers the per-packet traceline has a CPU cost; tune <code>csb_wh_firegrace</code> to taste.</p>
+126 -0 addons/amxmodx/scripting/csb_wallhack_blocker.sma A
@@ -0,0 +1,126 @@
1 +/*
2 + * CSB Wallhack Blocker
3 + * Copyright (C) 2026 counter-strike-boost.com
4 + *
5 + * Server-side wallhack / ESP protection. In FM_AddToFullPack the plugin decides,
6 + * per viewer, whether an enemy player entity is actually visible: it must be in
7 + * the viewer's PVS and have a clear line of sight from the viewer's eyes to the
8 + * target's centre or head. If neither is clear (and the target has not fired
9 + * recently), the entity is dropped from that client's packet, so it cannot be
10 + * seen through walls. Teammates and recently-firing enemies are always shown.
11 + *
12 + * Inspired by the classic AddToFullPack wall blocker approach (Fysiks /
13 + * OrangeBox). Independent GPL re-implementation; no original code is reused.
14 + *
15 + * This program is free software: you can redistribute it and/or modify it under
16 + * the terms of the GNU General Public License as published by the Free Software
17 + * Foundation, either version 3 of the License, or (at your option) any later
18 + * version. It is distributed in the hope that it will be useful, but WITHOUT
19 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20 + * FOR A PARTICULAR PURPOSE. See <https://www.gnu.org/licenses/> for details.
21 + */
22 +
23 +#include <amxmodx>
24 +#include <fakemeta>
25 +
26 +new const PLUGIN[] = "CSB Wallhack Blocker"
27 +new const VERSION[] = "1.0.0"
28 +new const AUTHOR[] = "counter-strike-boost.com"
29 +
30 +new g_pEnabled, g_pGrace
31 +new Float:g_fLastFire[33]
32 +new g_iMaxPlayers
33 +
34 +public plugin_init()
35 +{
36 + register_plugin(PLUGIN, VERSION, AUTHOR)
37 +
38 + g_pEnabled = register_cvar("csb_wh_enabled", "1")
39 + g_pGrace = register_cvar("csb_wh_firegrace", "1.2")
40 +
41 + register_forward(FM_AddToFullPack, "fwAddToFullPack", 0)
42 + register_forward(FM_EmitSound, "fwEmitSound", 0)
43 +
44 + g_iMaxPlayers = get_maxplayers()
45 +}
46 +
47 +public client_putinserver(id)
48 +{
49 + g_fLastFire[id] = 0.0
50 +}
51 +
52 +/* record when a player produces a weapon sound, for the fire grace window */
53 +public fwEmitSound(ent, channel, const sample[])
54 +{
55 + if (ent >= 1 && ent <= g_iMaxPlayers)
56 + {
57 + if (sample[0] == 'w' && sample[1] == 'e' && containi(sample, "weapons/") == 0)
58 + g_fLastFire[ent] = get_gametime()
59 + }
60 +
61 + return FMRES_IGNORED
62 +}
63 +
64 +public fwAddToFullPack(es, e, ent, host, hostflags, player, pSet)
65 +{
66 + if (!get_pcvar_num(g_pEnabled))
67 + return FMRES_IGNORED
68 +
69 + /* only care about player entities being packed for a player host */
70 + if (!player)
71 + return FMRES_IGNORED
72 +
73 + if (ent < 1 || ent > g_iMaxPlayers || host < 1 || host > g_iMaxPlayers)
74 + return FMRES_IGNORED
75 +
76 + if (ent == host)
77 + return FMRES_IGNORED
78 +
79 + if (!is_user_alive(host) || !is_user_alive(ent))
80 + return FMRES_IGNORED
81 +
82 + /* never hide teammates */
83 + if (get_user_team(host) == get_user_team(ent))
84 + return FMRES_IGNORED
85 +
86 + /* recently fired -> position is already given away, keep visible */
87 + if (get_gametime() - g_fLastFire[ent] < get_pcvar_float(g_pGrace))
88 + return FMRES_IGNORED
89 +
90 + /* must be inside the host PVS at all */
91 + if (!engfunc(EngFunc_CheckVisibility, ent, pSet))
92 + return FMRES_SUPERCEDE
93 +
94 + /* eye position of the viewer */
95 + static Float:fEye[3], Float:fOfs[3]
96 + pev(host, pev_origin, fEye)
97 + pev(host, pev_view_ofs, fOfs)
98 + fEye[0] += fOfs[0]
99 + fEye[1] += fOfs[1]
100 + fEye[2] += fOfs[2]
101 +
102 + /* target centre and head */
103 + static Float:fTarget[3], Float:fHead[3], Float:fTOfs[3]
104 + pev(ent, pev_origin, fTarget)
105 + pev(ent, pev_view_ofs, fTOfs)
106 +
107 + fHead[0] = fTarget[0] + fTOfs[0]
108 + fHead[1] = fTarget[1] + fTOfs[1]
109 + fHead[2] = fTarget[2] + fTOfs[2]
110 +
111 + if (clearLine(fEye, fTarget, host) || clearLine(fEye, fHead, host))
112 + return FMRES_IGNORED
113 +
114 + /* no clear sight line -> drop from this client's packet */
115 + return FMRES_SUPERCEDE
116 +}
117 +
118 +bool:clearLine(const Float:start[3], const Float:end[3], ignore)
119 +{
120 + engfunc(EngFunc_TraceLine, start, end, IGNORE_MONSTERS, ignore, 0)
121 +
122 + static Float:fFrac
123 + get_tr2(0, TR_flFraction, fFrac)
124 +
125 + return (fFrac >= 1.0)
126 +}
+36 -0 csb.json A
@@ -0,0 +1,36 @@
1 +{
2 + "name": "CSB Wallhack Blocker",
3 + "category": "anticheat",
4 + "tags": "wallhack, esp, blocker",
5 + "image": "",
6 + "original_author": "Fysiks (AddToFullPack technique)",
7 + "original_url": "",
8 + "license": "GPL-3.0",
9 + "title": "CSB Wallhack Blocker",
10 + "short_desc": "Server-side ESP/wallhack protection: hides enemies from a client's packet unless there is a real line of sight.",
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_wallhack_blocker.amxx in addons/amxmodx/plugins/ and add it to plugins.ini\n3. Change map",
21 + "known_conflicts": "Other plugins that force entity visibility or edit AddToFullPack can fight this one; run only one visibility controller.",
22 + "cvars": [
23 + {
24 + "name": "csb_wh_enabled",
25 + "default": "1",
26 + "description": "Enable or disable the wallhack blocker."
27 + },
28 + {
29 + "name": "csb_wh_firegrace",
30 + "default": "1.2",
31 + "description": "Seconds an enemy stays visible after firing a weapon."
32 + }
33 + ],
34 + "commands": [],
35 + "main": "addons/amxmodx/scripting/csb_wallhack_blocker.sma"
36 +}
0 37