Wallhack-style glow on players for admins only, injected per-client in FM_AddToFullPack so normal players see nothing.
csb_admin_esp.sma v1.0.0
1
/*
2
* CSB Admin ESP
3
* Copyright (C) 2026 counter-strike-boost.com
4
*
5
* Gives an admin a wallhack-style glow on players. It hooks FM_AddToFullPack and
6
* sets kRenderFxGlowShell + a team colour ONLY in the packets destined for that
7
* one admin client, so normal players see nothing changed. Toggled per admin
8
* with amx_esp and restricted by a flag.
9
*
10
* This program is free software: you can redistribute it and/or modify it under
11
* the terms of the GNU General Public License as published by the Free Software
12
* Foundation, either version 3 of the License, or (at your option) any later
13
* version. It is distributed in the hope that it will be useful, but WITHOUT
14
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15
* FOR A PARTICULAR PURPOSE. See <https://www.gnu.org/licenses/> for details.
16
*/
17
18
#include <amxmodx>
19
#include <amxmisc>
20
#include <fakemeta>
21
22
new const PLUGIN[] = "CSB Admin ESP"
23
new const VERSION[] = "1.0.0"
24
new const AUTHOR[] = "counter-strike-boost.com"
25
26
new bool:g_bEsp[33]
27
new g_pEnabled
28
new g_iActive = 0
29
30
public plugin_init()
31
{
32
register_plugin(PLUGIN, VERSION, AUTHOR)
33
34
g_pEnabled = register_cvar("csb_esp_enabled", "1")
35
36
register_concmd("amx_esp", "cmdEsp", ADMIN_CFG, "[0|1] - toggle wallhack glow ESP for yourself")
37
38
register_forward(FM_AddToFullPack, "fwAddToFullPack", 1)
39
}
40
41
public client_disconnected(id)
42
{
43
if (g_bEsp[id])
44
{
45
g_bEsp[id] = false
46
g_iActive--
47
}
48
}
49
50
public cmdEsp(id, level, cid)
51
{
52
if (!cmd_access(id, level, cid, 1))
53
return PLUGIN_HANDLED
54
55
if (!get_pcvar_num(g_pEnabled))
56
{
57
console_print(id, "[CSB] ESP is disabled (csb_esp_enabled 0).")
58
return PLUGIN_HANDLED
59
}
60
61
new bool:want = !g_bEsp[id]
62
63
if (read_argc() > 1)
64
{
65
new arg[4]
66
read_argv(1, arg, charsmax(arg))
67
want = (str_to_num(arg) != 0)
68
}
69
70
if (want == g_bEsp[id])
71
{
72
client_print(id, print_chat, "[CSB] ESP already %s.", want ? "ON" : "OFF")
73
return PLUGIN_HANDLED
74
}
75
76
g_bEsp[id] = want
77
g_iActive += want ? 1 : -1
78
79
client_print(id, print_chat, "[CSB] Admin ESP %s.", want ? "ON" : "OFF")
80
81
new aname[32]
82
get_user_name(id, aname, charsmax(aname))
83
log_amx("[CSB ESP] %s turned ESP %s", aname, want ? "on" : "off")
84
return PLUGIN_HANDLED
85
}
86
87
public fwAddToFullPack(es, e, ent, host, hostflags, player, pSet)
88
{
89
/* only rewrite entity states for player entities... */
90
if (!player)
91
return FMRES_IGNORED
92
93
/* ...and only when the receiving host is an admin with ESP enabled */
94
if (host < 1 || host > 32 || !g_bEsp[host])
95
return FMRES_IGNORED
96
97
if (ent == host || !is_user_alive(ent))
98
return FMRES_IGNORED
99
100
new r = 200, g = 200, b = 200
101
102
switch (get_user_team(ent))
103
{
104
case 1: { r = 255; g = 60; b = 60; } /* T - red */
105
case 2: { r = 60; g = 120; b = 255; } /* CT - blue */
106
default: { r = 200; g = 200; b = 200; }
107
}
108
109
new Float:color[3]
110
color[0] = float(r)
111
color[1] = float(g)
112
color[2] = float(b)
113
114
set_es(es, ES_RenderMode, kRenderNormal)
115
set_es(es, ES_RenderFx, kRenderFxGlowShell)
116
set_es(es, ES_RenderColor, color)
117
set_es(es, ES_RenderAmt, 30.0)
118
119
return FMRES_HANDLED
120
}
121









