Promoveaza serverul

Initial release 1.0.0

Browse Source
1.0.0 - Initial release.
Daemon666 committed commit e69b13be3ca33cfb2422e7b6bba57067b818804d
4 changed files with 242 additions and 0 deletions
+3 -0 CHANGELOG.md A
@@ -0,0 +1,3 @@
1 +## 1.0.0 (2025-10-26)
2 +
3 +1.0.0 - Initial release.
+1 -0 README.md A
@@ -0,0 +1 @@
1 +<p><strong>CSB Player Auras</strong> gives VIPs a coloured glow-shell around their model. Type <code>say /aura</code> to open a menu, pick from eight colours (or Off), and optionally toggle a <strong>pulsing</strong> effect that breathes the glow brightness up and down on a task. The aura is re-applied automatically every spawn and cleared on death so it never lingers on a corpse.</p><h2>Features</h2><ul><li>Menu-driven colour picker: Red, Green, Blue, Yellow, Cyan, Purple, White or Off.</li><li>Optional pulsing brightness driven by a shared task.</li><li>Uses <code>set_user_rendering</code> with <code>kRenderFxGlowShell</code>.</li><li>Access-flag gated (VIP / shop), re-applied on spawn, cleared on death.</li></ul><h2>Installation</h2><ol><li>Enable the <code>fun</code> module in <code>modules.ini</code>.</li><li>Compile <code>csb_auras.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>The menu requires the <code>ADMIN_LEVEL_H</code> flag (<code>t</code>) by default &mdash; the flag most shop/VIP systems hand out.</p>
+191 -0 addons/amxmodx/scripting/csb_auras.sma A
@@ -0,0 +1,191 @@
1 +/*
2 + * CSB Player Auras
3 + * Copyright (C) 2026 counter-strike-boost.com
4 + *
5 + * Gives a player a coloured glow-shell aura chosen from a menu, with an optional
6 + * pulsing brightness effect driven by a task. The feature is gated behind an
7 + * access flag (VIP/shop), the aura is re-applied on spawn and cleared on death.
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 <fun>
19 +
20 +new const PLUGIN[] = "CSB Player Auras"
21 +new const VERSION[] = "1.0.0"
22 +new const AUTHOR[] = "counter-strike-boost.com"
23 +
24 +#define ACCESS_FLAG ADMIN_LEVEL_H
25 +
26 +#define AURA_NONE 0
27 +
28 +new const g_szColorName[][] = { "Off", "Red", "Green", "Blue", "Yellow", "Cyan", "Purple", "White" }
29 +new const g_iColorRGB[][3] =
30 +{
31 + { 0, 0, 0 },
32 + { 255, 0, 0 },
33 + { 0, 255, 0 },
34 + { 0, 0, 255 },
35 + { 255, 255, 0 },
36 + { 0, 255,255 },
37 + { 200, 0, 255 },
38 + { 255, 255,255 }
39 +}
40 +
41 +new g_pEnabled, g_pMinBright, g_pMaxBright
42 +new g_iAura[33]
43 +new bool:g_bPulse[33]
44 +new g_iPhase
45 +
46 +public plugin_init()
47 +{
48 + register_plugin(PLUGIN, VERSION, AUTHOR)
49 +
50 + g_pEnabled = register_cvar("csb_aura_enabled", "1")
51 + g_pMinBright = register_cvar("csb_aura_minbright", "60")
52 + g_pMaxBright = register_cvar("csb_aura_maxbright", "180")
53 +
54 + register_clcmd("say /aura", "cmdAura")
55 + register_clcmd("say_team /aura", "cmdAura")
56 +
57 + register_event("DeathMsg", "eventDeath", "a", "1>0")
58 + register_event("ResetHUD", "eventSpawn", "b")
59 +
60 + set_task(0.3, "taskPulse", 0, _, _, "b")
61 +}
62 +
63 +public client_putinserver(id)
64 +{
65 + g_iAura[id] = AURA_NONE
66 + g_bPulse[id] = false
67 +}
68 +
69 +bool:hasAccess(id)
70 +{
71 + return (get_user_flags(id) & ACCESS_FLAG) != 0
72 +}
73 +
74 +public cmdAura(id)
75 +{
76 + if (!get_pcvar_num(g_pEnabled))
77 + return PLUGIN_HANDLED
78 +
79 + if (!hasAccess(id))
80 + {
81 + client_print(id, print_chat, "[CSB] Auras are a VIP feature.")
82 + return PLUGIN_HANDLED
83 + }
84 +
85 + new menu = menu_create("\yCSB Player Aura^n\wPick a colour:", "auraHandler")
86 +
87 + new info[4]
88 + for (new i = 0; i < sizeof(g_szColorName); i++)
89 + {
90 + num_to_str(i, info, charsmax(info))
91 + menu_additem(menu, g_szColorName[i], info, 0)
92 + }
93 +
94 + menu_additem(menu, "\wTogglePulse", "99", 0)
95 + menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
96 + menu_display(id, menu, 0)
97 + return PLUGIN_HANDLED
98 +}
99 +
100 +public auraHandler(id, menu, item)
101 +{
102 + if (item == MENU_EXIT)
103 + {
104 + menu_destroy(menu)
105 + return PLUGIN_HANDLED
106 + }
107 +
108 + new info[4], name[32], access, callback
109 + menu_item_getinfo(menu, item, access, info, charsmax(info), name, charsmax(name), callback)
110 + menu_destroy(menu)
111 +
112 + new choice = str_to_num(info)
113 +
114 + if (choice == 99)
115 + {
116 + g_bPulse[id] = !g_bPulse[id]
117 + client_print(id, print_chat, "[CSB] Aura pulsing %s.", g_bPulse[id] ? "enabled" : "disabled")
118 + applyAura(id)
119 + return PLUGIN_HANDLED
120 + }
121 +
122 + g_iAura[id] = choice
123 +
124 + if (choice == AURA_NONE)
125 + client_print(id, print_chat, "[CSB] Aura removed.")
126 + else
127 + client_print(id, print_chat, "[CSB] Aura set to %s.", g_szColorName[choice])
128 +
129 + applyAura(id)
130 + return PLUGIN_HANDLED
131 +}
132 +
133 +applyAura(id)
134 +{
135 + if (!is_user_alive(id))
136 + return
137 +
138 + new a = g_iAura[id]
139 +
140 + if (a == AURA_NONE)
141 + {
142 + set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
143 + return
144 + }
145 +
146 + new amount = g_bPulse[id] ? get_pcvar_num(g_pMaxBright) : get_pcvar_num(g_pMinBright)
147 +
148 + set_user_rendering(id, kRenderFxGlowShell,
149 + g_iColorRGB[a][0], g_iColorRGB[a][1], g_iColorRGB[a][2],
150 + kRenderNormal, amount)
151 +}
152 +
153 +public eventSpawn(id)
154 +{
155 + if (is_user_alive(id) && g_iAura[id] != AURA_NONE)
156 + applyAura(id)
157 +}
158 +
159 +public eventDeath()
160 +{
161 + new victim = read_data(2)
162 +
163 + if (victim >= 1 && victim <= 32)
164 + set_user_rendering(victim, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
165 +}
166 +
167 +public taskPulse()
168 +{
169 + g_iPhase = (g_iPhase + 1) % 2
170 +
171 + new lo = get_pcvar_num(g_pMinBright)
172 + new hi = get_pcvar_num(g_pMaxBright)
173 +
174 + new players[32], num, pid
175 + get_players(players, num, "a")
176 +
177 + for (new i = 0; i < num; i++)
178 + {
179 + pid = players[i]
180 +
181 + if (g_iAura[pid] == AURA_NONE || !g_bPulse[pid])
182 + continue
183 +
184 + new a = g_iAura[pid]
185 + new amount = g_iPhase ? hi : lo
186 +
187 + set_user_rendering(pid, kRenderFxGlowShell,
188 + g_iColorRGB[a][0], g_iColorRGB[a][1], g_iColorRGB[a][2],
189 + kRenderNormal, amount)
190 + }
191 +}
+47 -0 csb.json A
@@ -0,0 +1,47 @@
1 +{
2 + "name": "CSB Player Auras",
3 + "category": "fun",
4 + "tags": "aura, glow, cosmetic",
5 + "image": "",
6 + "original_author": "",
7 + "original_url": "",
8 + "license": "GPL-3.0",
9 + "title": "CSB Player Auras",
10 + "short_desc": "VIP glow-shell auras picked from a menu, with an optional pulsing effect, re-applied on spawn and cleared on death.",
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": "fun",
20 + "install_notes": "1. Enable the fun module in addons/amxmodx/configs/modules.ini\n2. Put csb_auras.amxx in addons/amxmodx/plugins/ and add it to plugins.ini\n3. Change map",
21 + "known_conflicts": "Other plugins that call set_user_rendering (models, effects) can override the aura's glow shell.",
22 + "cvars": [
23 + {
24 + "name": "csb_aura_enabled",
25 + "default": "1",
26 + "description": "Enable or disable auras."
27 + },
28 + {
29 + "name": "csb_aura_minbright",
30 + "default": "60",
31 + "description": "Low brightness of the glow (and pulse trough)."
32 + },
33 + {
34 + "name": "csb_aura_maxbright",
35 + "default": "180",
36 + "description": "High brightness of the glow (and pulse peak)."
37 + }
38 + ],
39 + "commands": [
40 + {
41 + "name": "say /aura",
42 + "access": "t (ADMIN_LEVEL_H)",
43 + "description": "Open the aura colour menu."
44 + }
45 + ],
46 + "main": "addons/amxmodx/scripting/csb_auras.sma"
47 +}
0 48