/* * CSB Pistol Round * Copyright (C) 2026 counter-strike-boost.com * * Forces a pistol round. The first round of the map (and optionally the first * round of the second half after a team swap) is locked to pistols: rifle, SMG, * shotgun, sniper and machine-gun buys are blocked, players are stripped and * re-armed with a knife, their side's default pistol and full pistol ammo on * spawn, and a HUD notice tells everyone it is a pistol round. * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. It is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See for details. */ #include #include #include #include new const PLUGIN[] = "CSB Pistol Round" new const VERSION[] = "1.0.0" new const AUTHOR[] = "counter-strike-boost.com" new g_pEnabled, g_pSecondHalf new g_iRound new bool:g_bPistolRound new g_iHudSync new const g_szBlockedBuy[][] = { "m4a1", "ak47", "aug", "sg552", "galil", "famas", "scout", "awp", "g3sg1", "sg550", "m3", "xm1014", "mp5", "tmp", "mac10", "ump45", "p90", "m249" } public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) g_pEnabled = register_cvar("csb_pistol_enabled", "1") g_pSecondHalf = register_cvar("csb_pistol_secondhalf", "1") RegisterHam(Ham_Spawn, "player", "fwSpawnPost", 1) register_logevent("eventRoundStart", 2, "1=Round_Start") for (new i = 0; i < sizeof(g_szBlockedBuy); i++) register_clcmd(g_szBlockedBuy[i], "blockBuy") g_iHudSync = CreateHudSyncObj() } public eventRoundStart() { if (!get_pcvar_num(g_pEnabled)) { g_bPistolRound = false return } g_iRound++ /* first round of the map, and optionally the second-half opener (round 16) */ g_bPistolRound = (g_iRound == 1) || (get_pcvar_num(g_pSecondHalf) && g_iRound == 16) if (g_bPistolRound) { client_print(0, print_chat, "^x04[Pistol Round]^x01 Pistols only this round!") set_hudmessage(255, 200, 0, -1.0, 0.20, 0, 0.0, 4.0, 0.1, 0.5, -1) ShowSyncHudMsg(0, g_iHudSync, "PISTOL ROUND") } } public fwSpawnPost(id) { if (!g_bPistolRound || !is_user_alive(id)) return set_task(0.2, "taskEquip", id) } public taskEquip(id) { if (!is_user_alive(id) || !g_bPistolRound) return new team = get_user_team(id) strip_user_weapons(id) give_item(id, "weapon_knife") if (team == 1) { give_item(id, "weapon_glock18") cs_set_user_bpammo(id, CSW_GLOCK18, 40) } else if (team == 2) { give_item(id, "weapon_usp") cs_set_user_bpammo(id, CSW_USP, 24) } } public blockBuy(id) { if (g_bPistolRound) { client_print(id, print_chat, "[CSB] Pistol round - no rifles.") return PLUGIN_HANDLED } return PLUGIN_CONTINUE }