Initial release 1.0.0
Browse Source1.0.0 - Initial release.
4 changed files
with 186 additions and 0 deletions
A
CHANGELOG.md
+3 -0
A
README.md
+1 -0
A
addons/amxmodx/scripting/csb_round_summary.sma
+151 -0
A
csb.json
+31 -0
CHANGELOG.md
A
| @@ -0,0 +1,3 @@ | ||
| 1 | +## 1.0.0 (2025-09-03) | |
| 2 | + | |
| 3 | +1.0.0 - Initial release. |
README.md
A
| @@ -0,0 +1 @@ | ||
| 1 | +<p><strong>CSB Round Summary</strong> ends every round with a quick recap. It tracks kills (from <code>DeathMsg</code>) and damage (from <code>Ham_TakeDamage</code>) live during the round, then when a team wins it shows the winner, the running <strong>T - CT score</strong>, the round <strong>MVP</strong> (most kills), the <strong>top damage dealer</strong> and how many players survived - both in a HUD sync channel and in chat. All per-round counters reset when the next round starts.</p><h2>Features</h2><ul><li>Winner and running score for both teams.</li><li>Round MVP by kills and top damage dealer by damage dealt.</li><li>Survivor count at the moment the round ends.</li><li>Per-round kill and damage tracking that resets each round.</li></ul><h2>Installation</h2><ol><li>Enable the <code>hamsandwich</code> module in <code>modules.ini</code>.</li><li>Compile <code>csb_round_summary.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> |
addons/amxmodx/scripting/csb_round_summary.sma
A
| @@ -0,0 +1,151 @@ | ||
| 1 | +/* | |
| 2 | + * CSB Round Summary | |
| 3 | + * Copyright (C) 2026 counter-strike-boost.com | |
| 4 | + * | |
| 5 | + * At the end of each round it prints a short summary in a HUD sync channel and in | |
| 6 | + * chat: which team won, the running score, the round MVP (most kills this round), | |
| 7 | + * the top damage dealer and how many players survived. Per-round kills and damage | |
| 8 | + * are tracked live (DeathMsg for kills, Ham_TakeDamage for damage) and reset when | |
| 9 | + * the next round starts. | |
| 10 | + * | |
| 11 | + * This program is free software: you can redistribute it and/or modify it under | |
| 12 | + * the terms of the GNU General Public License as published by the Free Software | |
| 13 | + * Foundation, either version 3 of the License, or (at your option) any later | |
| 14 | + * version. It is distributed in the hope that it will be useful, but WITHOUT | |
| 15 | + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | |
| 16 | + * FOR A PARTICULAR PURPOSE. See <https://www.gnu.org/licenses/> for details. | |
| 17 | + */ | |
| 18 | + | |
| 19 | +#include <amxmodx> | |
| 20 | +#include <hamsandwich> | |
| 21 | + | |
| 22 | +new const PLUGIN[] = "CSB Round Summary" | |
| 23 | +new const VERSION[] = "1.0.0" | |
| 24 | +new const AUTHOR[] = "counter-strike-boost.com" | |
| 25 | + | |
| 26 | +new g_iKills[33] | |
| 27 | +new Float:g_fDamage[33] | |
| 28 | +new g_iScoreT, g_iScoreCT | |
| 29 | +new g_iSync | |
| 30 | +new g_pEnabled | |
| 31 | + | |
| 32 | +public plugin_init() | |
| 33 | +{ | |
| 34 | + register_plugin(PLUGIN, VERSION, AUTHOR) | |
| 35 | + | |
| 36 | + g_pEnabled = register_cvar("csb_summary_enabled", "1") | |
| 37 | + | |
| 38 | + g_iSync = CreateHudSyncObj() | |
| 39 | + | |
| 40 | + RegisterHam(Ham_TakeDamage, "player", "hamTakeDamage", 0) | |
| 41 | + | |
| 42 | + register_event("DeathMsg", "eventDeath", "a", "1>0") | |
| 43 | + register_logevent("eventRoundStart", 2, "1=Round_Start") | |
| 44 | + | |
| 45 | + register_event("TextMsg", "eventTerWin", "a", "2&#Terrorists_Win") | |
| 46 | + register_event("TextMsg", "eventCtWin", "a", "2&#CTs_Win") | |
| 47 | + register_event("TextMsg", "eventDraw", "a", "2&#Round_Draw") | |
| 48 | +} | |
| 49 | + | |
| 50 | +public hamTakeDamage(victim, inflictor, attacker, Float:damage, damagebits) | |
| 51 | +{ | |
| 52 | + if (attacker < 1 || attacker > 32 || attacker == victim) | |
| 53 | + return HAM_IGNORED | |
| 54 | + | |
| 55 | + if (damage > 0.0) | |
| 56 | + g_fDamage[attacker] += damage | |
| 57 | + | |
| 58 | + return HAM_IGNORED | |
| 59 | +} | |
| 60 | + | |
| 61 | +public eventDeath() | |
| 62 | +{ | |
| 63 | + new killer = read_data(1) | |
| 64 | + | |
| 65 | + if (killer >= 1 && killer <= 32) | |
| 66 | + g_iKills[killer]++ | |
| 67 | +} | |
| 68 | + | |
| 69 | +public eventRoundStart() | |
| 70 | +{ | |
| 71 | + for (new i = 1; i <= 32; i++) | |
| 72 | + { | |
| 73 | + g_iKills[i] = 0 | |
| 74 | + g_fDamage[i] = 0.0 | |
| 75 | + } | |
| 76 | +} | |
| 77 | + | |
| 78 | +public eventTerWin() | |
| 79 | +{ | |
| 80 | + g_iScoreT++ | |
| 81 | + showSummary("Terrorists") | |
| 82 | +} | |
| 83 | + | |
| 84 | +public eventCtWin() | |
| 85 | +{ | |
| 86 | + g_iScoreCT++ | |
| 87 | + showSummary("Counter-Terrorists") | |
| 88 | +} | |
| 89 | + | |
| 90 | +public eventDraw() | |
| 91 | +{ | |
| 92 | + showSummary("Nobody (draw)") | |
| 93 | +} | |
| 94 | + | |
| 95 | +showSummary(const winner[]) | |
| 96 | +{ | |
| 97 | + if (!get_pcvar_num(g_pEnabled)) | |
| 98 | + return | |
| 99 | + | |
| 100 | + new mvp = 0, mvpKills = 0 | |
| 101 | + new dmgTop = 0 | |
| 102 | + new Float:dmgTopVal = 0.0 | |
| 103 | + new alive = 0 | |
| 104 | + | |
| 105 | + new players[32], num | |
| 106 | + get_players(players, num, "ch") | |
| 107 | + | |
| 108 | + for (new i = 0; i < num; i++) | |
| 109 | + { | |
| 110 | + new pl = players[i] | |
| 111 | + | |
| 112 | + if (g_iKills[pl] > mvpKills) | |
| 113 | + { | |
| 114 | + mvpKills = g_iKills[pl] | |
| 115 | + mvp = pl | |
| 116 | + } | |
| 117 | + | |
| 118 | + if (g_fDamage[pl] > dmgTopVal) | |
| 119 | + { | |
| 120 | + dmgTopVal = g_fDamage[pl] | |
| 121 | + dmgTop = pl | |
| 122 | + } | |
| 123 | + | |
| 124 | + if (is_user_alive(pl)) | |
| 125 | + alive++ | |
| 126 | + } | |
| 127 | + | |
| 128 | + new mvpName[32], dmgName[32] | |
| 129 | + | |
| 130 | + if (mvp) | |
| 131 | + get_user_name(mvp, mvpName, charsmax(mvpName)) | |
| 132 | + else | |
| 133 | + copy(mvpName, charsmax(mvpName), "-") | |
| 134 | + | |
| 135 | + if (dmgTop) | |
| 136 | + get_user_name(dmgTop, dmgName, charsmax(dmgName)) | |
| 137 | + else | |
| 138 | + copy(dmgName, charsmax(dmgName), "-") | |
| 139 | + | |
| 140 | + set_hudmessage(0, 220, 120, -1.0, 0.24, 0, 0.0, 5.0, 0.2, 0.4, -1) | |
| 141 | + ShowSyncHudMsg(0, g_iSync, | |
| 142 | + "%s win! T %d - %d CT^nMVP: %s (%d kills)^nTop damage: %s (%d)^nSurvivors: %d", | |
| 143 | + winner, g_iScoreT, g_iScoreCT, | |
| 144 | + mvpName, mvpKills, | |
| 145 | + dmgName, floatround(dmgTopVal), | |
| 146 | + alive) | |
| 147 | + | |
| 148 | + client_print(0, print_chat, | |
| 149 | + "[CSB] %s win | Score T %d - %d CT | MVP: %s (%d) | Top dmg: %s (%d)", | |
| 150 | + winner, g_iScoreT, g_iScoreCT, mvpName, mvpKills, dmgName, floatround(dmgTopVal)) | |
| 151 | +} |
csb.json
A
| @@ -0,0 +1,31 @@ | ||
| 1 | +{ | |
| 2 | + "name": "CSB Round Summary", | |
| 3 | + "category": "hud-info", | |
| 4 | + "tags": "round, summary, hud", | |
| 5 | + "image": "", | |
| 6 | + "original_author": "", | |
| 7 | + "original_url": "", | |
| 8 | + "license": "GPL-3.0", | |
| 9 | + "title": "CSB Round Summary", | |
| 10 | + "short_desc": "Shows a HUD and chat summary at round end: winner, running score, MVP, top damage dealer and survivor count.", | |
| 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": "hamsandwich", | |
| 20 | + "install_notes": "1. Enable the hamsandwich module in addons/amxmodx/configs/modules.ini\n2. Put csb_round_summary.amxx in addons/amxmodx/plugins/ and add it to plugins.ini\n3. Change map", | |
| 21 | + "known_conflicts": "Other plugins that draw a HUD message in the same screen area at round end may overlap.", | |
| 22 | + "cvars": [ | |
| 23 | + { | |
| 24 | + "name": "csb_summary_enabled", | |
| 25 | + "default": "1", | |
| 26 | + "description": "Enable or disable the round summary." | |
| 27 | + } | |
| 28 | + ], | |
| 29 | + "commands": [], | |
| 30 | + "main": "addons/amxmodx/scripting/csb_round_summary.sma" | |
| 31 | +} | |
| 0 | 32 |









