Initial release 1.0.0
Browse Source1.0.0 - Initial release.
4 changed files
with 283 additions and 0 deletions
A
CHANGELOG.md
+3 -0
A
README.md
+1 -0
A
addons/amxmodx/scripting/csb_prop_hunt.sma
+233 -0
A
csb.json
+46 -0
CHANGELOG.md
A
| @@ -0,0 +1,3 @@ | ||
| 1 | +## 1.0.0 (2025-10-26) | |
| 2 | + | |
| 3 | +1.0.0 - Initial release. |
README.md
A
| @@ -0,0 +1 @@ | ||
| 1 | +<p><strong>CSB Prop Hunt</strong> brings the hide-and-seek classic to CS 1.6. Hiders (Terrorists) have their player model swapped to a chosen prop model with its animation frozen, so a still hider blends into the scenery. Seekers (CTs) are frozen for a countdown and then hunt them down. A recurring taunt plays a sound and briefly glows every hider so the round always ends. A HUD shows how many props are still hiding.</p><h2>Features</h2><ul><li>Hiders disguised as frozen prop models.</li><li>Seeker countdown freeze at round start.</li><li>Taunt timer reveals hiders with a glow and sound.</li><li>Configurable teams, countdown and taunt interval.</li></ul><h2>Installation</h2><ol><li>Enable the <code>fakemeta</code>, <code>hamsandwich</code> and <code>fun</code> modules in <code>modules.ini</code>.</li><li>Compile <code>csb_prop_hunt.sma</code>, copy it to <code>addons/amxmodx/plugins/</code> and add it to <code>plugins.ini</code>.</li><li>Change the map. The bundled prop models ship with CS 1.6.</li></ol> |
addons/amxmodx/scripting/csb_prop_hunt.sma
A
| @@ -0,0 +1,233 @@ | ||
| 1 | +/* | |
| 2 | + * CSB Prop Hunt | |
| 3 | + * Copyright (C) 2026 counter-strike-boost.com | |
| 4 | + * | |
| 5 | + * Prop Hunt. Hiders (Terrorists) are disguised as map props: their player model | |
| 6 | + * is swapped to a chosen prop model and its animation is frozen, so a still hider | |
| 7 | + * blends in with the scenery. Seekers (CTs) are frozen for a countdown, then hunt | |
| 8 | + * them down. A recurring taunt plays a sound and briefly glows every hider so the | |
| 9 | + * round always ends. | |
| 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 <fakemeta> | |
| 21 | +#include <hamsandwich> | |
| 22 | +#include <fun> | |
| 23 | + | |
| 24 | +new const PLUGIN[] = "CSB Prop Hunt" | |
| 25 | +new const VERSION[] = "1.0.0" | |
| 26 | +new const AUTHOR[] = "counter-strike-boost.com" | |
| 27 | + | |
| 28 | +new const g_szProps[][] = | |
| 29 | +{ | |
| 30 | + "models/w_backpack.mdl", | |
| 31 | + "models/w_kevlar.mdl", | |
| 32 | + "models/w_smokegrenade.mdl", | |
| 33 | + "models/w_flashbang.mdl" | |
| 34 | +} | |
| 35 | +#define TAUNT_SOUND "items/suitchargeok1.wav" | |
| 36 | + | |
| 37 | +new g_pEnabled, g_pHiderTeam, g_pCountdown, g_pTaunt | |
| 38 | + | |
| 39 | +new bool:g_bHider[33] | |
| 40 | +new bool:g_bHunting | |
| 41 | +new g_iHudSync | |
| 42 | +new g_iValidProps | |
| 43 | + | |
| 44 | +public plugin_init() | |
| 45 | +{ | |
| 46 | + register_plugin(PLUGIN, VERSION, AUTHOR) | |
| 47 | + | |
| 48 | + g_pEnabled = register_cvar("csb_ph_enabled", "1") | |
| 49 | + g_pHiderTeam = register_cvar("csb_ph_hiderteam", "1") /* 1=T 2=CT */ | |
| 50 | + g_pCountdown = register_cvar("csb_ph_countdown", "15") | |
| 51 | + g_pTaunt = register_cvar("csb_ph_taunt", "25") | |
| 52 | + | |
| 53 | + RegisterHam(Ham_Spawn, "player", "fwSpawnPost", 1) | |
| 54 | + register_event("DeathMsg", "eventDeath", "a", "1>0") | |
| 55 | + register_logevent("eventRoundStart", 2, "1=Round_Start") | |
| 56 | + | |
| 57 | + g_iHudSync = CreateHudSyncObj() | |
| 58 | + | |
| 59 | + set_task(1.0, "taskTauntLoop", 0, _, _, "b") | |
| 60 | +} | |
| 61 | + | |
| 62 | +public plugin_precache() | |
| 63 | +{ | |
| 64 | + g_iValidProps = 0 | |
| 65 | + | |
| 66 | + for (new i = 0; i < sizeof(g_szProps); i++) | |
| 67 | + { | |
| 68 | + if (file_exists(g_szProps[i])) | |
| 69 | + { | |
| 70 | + engfunc(EngFunc_PrecacheModel, g_szProps[i]) | |
| 71 | + g_iValidProps++ | |
| 72 | + } | |
| 73 | + } | |
| 74 | + | |
| 75 | + precache_sound(TAUNT_SOUND) | |
| 76 | +} | |
| 77 | + | |
| 78 | +public eventRoundStart() | |
| 79 | +{ | |
| 80 | + g_bHunting = false | |
| 81 | + | |
| 82 | + if (!get_pcvar_num(g_pEnabled)) | |
| 83 | + return | |
| 84 | + | |
| 85 | + set_task(2.5, "taskAssign", 8181) | |
| 86 | +} | |
| 87 | + | |
| 88 | +public taskAssign() | |
| 89 | +{ | |
| 90 | + new hiderTeam = get_pcvar_num(g_pHiderTeam) | |
| 91 | + | |
| 92 | + new players[32], num | |
| 93 | + get_players(players, num, "a") | |
| 94 | + | |
| 95 | + for (new i = 0; i < num; i++) | |
| 96 | + { | |
| 97 | + new id = players[i] | |
| 98 | + | |
| 99 | + if (get_user_team(id) == hiderTeam) | |
| 100 | + makeHider(id) | |
| 101 | + else | |
| 102 | + set_user_maxspeed(id, 1.0) /* freeze seekers during countdown */ | |
| 103 | + } | |
| 104 | + | |
| 105 | + client_print(0, print_chat, "^x04[PropHunt]^x01 Hiders, disguise! Seekers unfreeze in %d seconds.", get_pcvar_num(g_pCountdown)) | |
| 106 | + | |
| 107 | + set_task(float(get_pcvar_num(g_pCountdown)), "taskRelease", 8282) | |
| 108 | +} | |
| 109 | + | |
| 110 | +public fwSpawnPost(id) | |
| 111 | +{ | |
| 112 | + g_bHider[id] = false | |
| 113 | +} | |
| 114 | + | |
| 115 | +makeHider(id) | |
| 116 | +{ | |
| 117 | + if (!is_user_alive(id)) | |
| 118 | + return | |
| 119 | + | |
| 120 | + g_bHider[id] = true | |
| 121 | + | |
| 122 | + if (g_iValidProps > 0) | |
| 123 | + { | |
| 124 | + new pick = pickValidProp() | |
| 125 | + | |
| 126 | + if (pick >= 0) | |
| 127 | + { | |
| 128 | + engfunc(EngFunc_SetModel, id, g_szProps[pick]) | |
| 129 | + set_pev(id, pev_sequence, 0) | |
| 130 | + set_pev(id, pev_framerate, 0.0) | |
| 131 | + } | |
| 132 | + } | |
| 133 | + | |
| 134 | + client_print(id, print_chat, "[CSB] You are a prop. Stay still to blend in.") | |
| 135 | +} | |
| 136 | + | |
| 137 | +pickValidProp() | |
| 138 | +{ | |
| 139 | + /* choose a random model that actually exists */ | |
| 140 | + new tries = 0 | |
| 141 | + while (tries < 20) | |
| 142 | + { | |
| 143 | + new i = random_num(0, sizeof(g_szProps) - 1) | |
| 144 | + if (file_exists(g_szProps[i])) | |
| 145 | + return i | |
| 146 | + tries++ | |
| 147 | + } | |
| 148 | + return -1 | |
| 149 | +} | |
| 150 | + | |
| 151 | +public taskRelease() | |
| 152 | +{ | |
| 153 | + g_bHunting = true | |
| 154 | + | |
| 155 | + new players[32], num | |
| 156 | + get_players(players, num, "a") | |
| 157 | + | |
| 158 | + for (new i = 0; i < num; i++) | |
| 159 | + { | |
| 160 | + if (!g_bHider[players[i]]) | |
| 161 | + set_user_maxspeed(players[i], 250.0) | |
| 162 | + } | |
| 163 | + | |
| 164 | + client_print(0, print_chat, "^x04[PropHunt]^x01 The hunt is on!") | |
| 165 | +} | |
| 166 | + | |
| 167 | +public eventDeath() | |
| 168 | +{ | |
| 169 | + new victim = read_data(2) | |
| 170 | + | |
| 171 | + if (victim >= 1 && victim <= 32 && g_bHider[victim]) | |
| 172 | + g_bHider[victim] = false | |
| 173 | +} | |
| 174 | + | |
| 175 | +public taskTauntLoop() | |
| 176 | +{ | |
| 177 | + static counter | |
| 178 | + counter++ | |
| 179 | + | |
| 180 | + if (!g_bHunting) | |
| 181 | + { | |
| 182 | + counter = 0 | |
| 183 | + return | |
| 184 | + } | |
| 185 | + | |
| 186 | + new interval = get_pcvar_num(g_pTaunt) | |
| 187 | + if (interval < 5) | |
| 188 | + interval = 5 | |
| 189 | + | |
| 190 | + if (counter % interval == 0) | |
| 191 | + taunt() | |
| 192 | + | |
| 193 | + /* HUD */ | |
| 194 | + new hiders = countHiders() | |
| 195 | + set_hudmessage(0, 200, 255, 0.02, 0.12, 0, 0.0, 1.1, 0.0, 0.0, -1) | |
| 196 | + ShowSyncHudMsg(0, g_iHudSync, "Props left: %d", hiders) | |
| 197 | +} | |
| 198 | + | |
| 199 | +taunt() | |
| 200 | +{ | |
| 201 | + new players[32], num | |
| 202 | + get_players(players, num, "a") | |
| 203 | + | |
| 204 | + for (new i = 0; i < num; i++) | |
| 205 | + { | |
| 206 | + new id = players[i] | |
| 207 | + | |
| 208 | + client_cmd(id, "play %s", TAUNT_SOUND) | |
| 209 | + | |
| 210 | + if (g_bHider[id]) | |
| 211 | + { | |
| 212 | + /* briefly reveal */ | |
| 213 | + set_user_rendering(id, kRenderFxGlowShell, 255, 180, 0, kRenderNormal, 120) | |
| 214 | + set_task(1.5, "taskUnglow", id) | |
| 215 | + } | |
| 216 | + } | |
| 217 | +} | |
| 218 | + | |
| 219 | +public taskUnglow(id) | |
| 220 | +{ | |
| 221 | + if (is_user_connected(id)) | |
| 222 | + set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0) | |
| 223 | +} | |
| 224 | + | |
| 225 | +countHiders() | |
| 226 | +{ | |
| 227 | + new c = 0 | |
| 228 | + for (new id = 1; id <= 32; id++) | |
| 229 | + if (g_bHider[id] && is_user_alive(id)) | |
| 230 | + c++ | |
| 231 | + | |
| 232 | + return c | |
| 233 | +} |
csb.json
A
| @@ -0,0 +1,46 @@ | ||
| 1 | +{ | |
| 2 | + "name": "CSB Prop Hunt", | |
| 3 | + "category": "gameplay", | |
| 4 | + "tags": "prop hunt, hide, fun", | |
| 5 | + "image": "", | |
| 6 | + "original_author": "", | |
| 7 | + "original_url": "", | |
| 8 | + "license": "GPL-3.0", | |
| 9 | + "title": "CSB Prop Hunt", | |
| 10 | + "short_desc": "Hiders are disguised as frozen map props while seekers, held for a countdown, hunt them; a recurring taunt reveals the hiders.", | |
| 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,hamsandwich,fun", | |
| 20 | + "install_notes": "1. Enable the fakemeta, hamsandwich and fun modules in addons/amxmodx/configs/modules.ini\n2. Put csb_prop_hunt.amxx in addons/amxmodx/plugins/ and add it to plugins.ini\n3. Change map", | |
| 21 | + "known_conflicts": "Only prop models that exist on the server are used; other model-changing plugins will conflict.", | |
| 22 | + "cvars": [ | |
| 23 | + { | |
| 24 | + "name": "csb_ph_enabled", | |
| 25 | + "default": "1", | |
| 26 | + "description": "Enable or disable prop hunt." | |
| 27 | + }, | |
| 28 | + { | |
| 29 | + "name": "csb_ph_hiderteam", | |
| 30 | + "default": "1", | |
| 31 | + "description": "Hider team: 1 = Terrorist, 2 = CT." | |
| 32 | + }, | |
| 33 | + { | |
| 34 | + "name": "csb_ph_countdown", | |
| 35 | + "default": "15", | |
| 36 | + "description": "Seconds seekers are frozen at round start." | |
| 37 | + }, | |
| 38 | + { | |
| 39 | + "name": "csb_ph_taunt", | |
| 40 | + "default": "25", | |
| 41 | + "description": "Seconds between taunts that reveal hiders." | |
| 42 | + } | |
| 43 | + ], | |
| 44 | + "commands": [], | |
| 45 | + "main": "addons/amxmodx/scripting/csb_prop_hunt.sma" | |
| 46 | +} | |
| 0 | 47 |









