Server bewerben

Initial release 1.0.0

Browse Source
1.0.0 - Initial release.
Daemon666 committed commit 665a18f7e4933e407f0c1368e019c5f821609df4
4 changed files with 180 additions and 0 deletions
+3 -0 CHANGELOG.md A
@@ -0,0 +1,3 @@
1 +## 1.0.0 (2025-07-13)
2 +
3 +1.0.0 - Initial release.
+1 -0 README.md A
@@ -0,0 +1 @@
1 +<p><strong>CSB LO3</strong> is the match-start ritual: <code>amx_lo3</code> issues three <code>sv_restartround</code> restarts with a configurable delay and an on-screen <em>RESTART n/3</em> countdown, then flashes <strong>LIVE! LIVE! LIVE!</strong> with a sound when the match goes live. <code>amx_lo1</code> is the single-restart variant. The restart itself resets score and money through the engine.</p><h2>Features</h2><ul><li><code>amx_lo3</code> (3 restarts) and <code>amx_lo1</code> (1 restart).</li><li>Configurable delay between restarts via <code>csb_lo3_delay</code>.</li><li>HUD countdown and a LIVE flash with a go signal.</li><li>Guards against starting a second sequence mid-run.</li></ul><h2>Installation</h2><ol><li>Compile <code>csb_lo3.sma</code> and copy it to <code>addons/amxmodx/plugins/</code>.</li><li>Add it to <code>plugins.ini</code> and change the map.</li></ol>
+129 -0 addons/amxmodx/scripting/csb_lo3.sma A
@@ -0,0 +1,129 @@
1 +/*
2 + * CSB LO3
3 + * Copyright (C) 2026 counter-strike-boost.com
4 + *
5 + * amx_lo3 runs three sv_restartround restarts with a configurable delay and an
6 + * on-screen countdown, then flashes LIVE! LIVE! LIVE! with a sound when the
7 + * match goes live. amx_lo1 does the same with a single restart. The restart
8 + * itself resets score and money via the engine.
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 +
21 +new const PLUGIN[] = "CSB LO3"
22 +new const VERSION[] = "1.0.0"
23 +new const AUTHOR[] = "counter-strike-boost.com"
24 +
25 +new g_pEnabled, g_pDelay
26 +new g_iLeft, g_iTotal
27 +new g_iSync
28 +
29 +public plugin_init()
30 +{
31 + register_plugin(PLUGIN, VERSION, AUTHOR)
32 +
33 + g_pEnabled = register_cvar("csb_lo3_enabled", "1")
34 + g_pDelay = register_cvar("csb_lo3_delay", "3.0")
35 +
36 + register_concmd("amx_lo3", "cmdLo3", ADMIN_BAN, "- 3 restarts then go LIVE")
37 + register_concmd("amx_lo1", "cmdLo1", ADMIN_BAN, "- 1 restart then go LIVE")
38 +
39 + g_iSync = CreateHudSyncObj()
40 +}
41 +
42 +public cmdLo3(id, level, cid)
43 +{
44 + if (!cmd_access(id, level, cid, 1))
45 + return PLUGIN_HANDLED
46 +
47 + beginLive(id, 3)
48 + return PLUGIN_HANDLED
49 +}
50 +
51 +public cmdLo1(id, level, cid)
52 +{
53 + if (!cmd_access(id, level, cid, 1))
54 + return PLUGIN_HANDLED
55 +
56 + beginLive(id, 1)
57 + return PLUGIN_HANDLED
58 +}
59 +
60 +beginLive(id, count)
61 +{
62 + if (!get_pcvar_num(g_pEnabled))
63 + {
64 + console_print(id, "[CSB LO3] Plugin is disabled.")
65 + return
66 + }
67 +
68 + if (g_iLeft > 0)
69 + {
70 + console_print(id, "[CSB LO3] A restart sequence is already running.")
71 + return
72 + }
73 +
74 + new name[32]
75 + if (id)
76 + get_user_name(id, name, charsmax(name))
77 + else
78 + copy(name, charsmax(name), "Console")
79 +
80 + client_print(0, print_chat, "[CSB LO3] %s started the LIVE sequence (%d restart(s)).", name, count)
81 +
82 + g_iTotal = count
83 + g_iLeft = count
84 + doRestart()
85 +}
86 +
87 +doRestart()
88 +{
89 + if (g_iLeft <= 0)
90 + {
91 + goLive()
92 + return
93 + }
94 +
95 + new done = g_iTotal - g_iLeft + 1
96 +
97 + /* classic knife-round style restart; resets score and money */
98 + server_cmd("sv_restartround 1")
99 +
100 + set_hudmessage(255, 160, 0, -1.0, 0.35, 0, 0.0, 3.0, 0.0, 0.0, -1)
101 + ShowSyncHudMsg(0, g_iSync, "RESTART %d / %d", done, g_iTotal)
102 + client_print(0, print_chat, "[CSB LO3] Restart %d of %d...", done, g_iTotal)
103 +
104 + g_iLeft--
105 +
106 + new Float:delay = get_pcvar_float(g_pDelay)
107 + if (delay < 1.0)
108 + delay = 1.0
109 +
110 + set_task(delay, "taskNext")
111 +}
112 +
113 +public taskNext()
114 +{
115 + doRestart()
116 +}
117 +
118 +goLive()
119 +{
120 + g_iLeft = 0
121 + g_iTotal = 0
122 +
123 + set_hudmessage(0, 255, 0, -1.0, 0.30, 2, 0.5, 4.0, 0.1, 0.1, -1)
124 + ShowSyncHudMsg(0, g_iSync, "LIVE! LIVE! LIVE!")
125 + client_print(0, print_chat, "[CSB LO3] ^x04LIVE LIVE LIVE^x01 - good luck, have fun!")
126 +
127 + /* audible go signal */
128 + client_cmd(0, "spk fvox/beep")
129 +}
+47 -0 csb.json A
@@ -0,0 +1,47 @@
1 +{
2 + "name": "CSB LO3",
3 + "category": "match",
4 + "tags": "lo3, restart, live",
5 + "image": "",
6 + "original_author": "",
7 + "original_url": "",
8 + "license": "GPL-3.0",
9 + "title": "CSB LO3",
10 + "short_desc": "amx_lo3 restarts the round three times with a countdown, then flashes LIVE! LIVE! LIVE! amx_lo1 does one restart.",
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": "",
20 + "install_notes": "1. Put csb_lo3.amxx in addons/amxmodx/plugins/\n2. Add it to plugins.ini\n3. Change map",
21 + "known_conflicts": "Other match/restart plugins that also send sv_restartround may double-restart.",
22 + "cvars": [
23 + {
24 + "name": "csb_lo3_enabled",
25 + "default": "1",
26 + "description": "Enable the LO3 commands."
27 + },
28 + {
29 + "name": "csb_lo3_delay",
30 + "default": "3.0",
31 + "description": "Seconds between restarts (minimum 1)."
32 + }
33 + ],
34 + "commands": [
35 + {
36 + "name": "amx_lo3",
37 + "access": "d (ADMIN_BAN)",
38 + "description": "Three restarts then go live."
39 + },
40 + {
41 + "name": "amx_lo1",
42 + "access": "d (ADMIN_BAN)",
43 + "description": "One restart then go live."
44 + }
45 + ],
46 + "main": "addons/amxmodx/scripting/csb_lo3.sma"
47 +}
0 48