Drop the bomb, or hand it to another terrorist, when the bomb carrier is AFK in Counter-Strike: Source.
srcdslab port of Afk Bomb 1.5.0 by RedSword (AlliedModders thread).
- One second after
round_start, the plugin finds the terrorist carrying the bomb and saves their state: money, armor, pressed buttons, weapons in slots 1 to 4, eye angles, angles, position and velocity. afkbombseconds later (plusmp_freezetimeifafkbomb_freezetimeis1), it compares the state again. If nothing changed, the carrier is AFK andafkbomb_actionapplies: drop the bomb (the carrier says it in team chat), or strip it and give a new one to a random alive terrorist, preferring terrorists that are moving.- Late checks: if the carrier was not AFK, or the bomb changed hands, the check is repeated every
afkbomb_latecheckdelayseconds (position, angles, velocity and weapons only). Afterafkbomb_latecheckchecks in a row without any change,afkbomb_latecheckactionapplies.
The bomb is dropped with CS_DropWeapon (cstrike extension) and given with GivePlayerItem (sdktools). Both rely on the gamedata shipped with SourceMod (sm-cstrike.games, sdktools.games), which has linux64 entries for Counter-Strike: Source: the plugin has no gamedata of its own.
- Counter-Strike: Source
- SourceMod 1.12 or newer
Download sm-plugin-AFKBomb-<version>-sm1.12.tar.gz or -sm1.13.tar.gz from the releases and extract it in cstrike/:
addons/sourcemod/plugins/AFKBomb.smx
addons/sourcemod/translations/AFKBomb.phrases.txt
| ConVar | Default | Description |
|---|---|---|
afkbomb |
2 |
Seconds before the first AFK check of the round. 0 disables the plugin. |
afkbomb_freezetime |
0 |
1 adds mp_freezetime to the first check delay. |
afkbomb_action |
0 |
Action when the carrier is AFK at round start: 1 drop, 0 give to a random terrorist. |
afkbomb_msg |
1 |
Announce it: the carrier says it in team chat (drop), or a chat message to everyone (give). |
afkbomb_latecheck |
2 |
Number of late checks without change before acting. 0 disables late checks. |
afkbomb_latecheckdelay |
5.0 |
Seconds between two late checks (minimum 1). |
afkbomb_latecheckaction |
1 |
Action after the late checks: 1 drop, 0 give to a random terrorist (can be abused by fake-AFK players). |
afkbombversion |
Plugin version (public, shown in the server rules). |
The config file is cfg/sourcemod/afkbomb.cfg (created on first load).
- RedSword / Bob Le Ponge: Afk Bomb.
- dalto (bomb drop code), AltPluzF4, AtomicStryker, Dr!fter, psychonic, sinblaster, TnTSCS: see the header of
AFKBomb.spand the AlliedModders thread. - Translations: noPASARAN (ru), away000 (pt), sajmon83 (pl), Groger (nl), Dr. Greg House (de), hleV (lt), Blowst (ko), RedSword (fr).
The first commit of this repository is the unmodified 1.5.0 source and translation file. See CHANGELOG.md for the srcdslab changes.