About [vscript] Minecraft-style command system for L4D2
From Steam WorkshopBring Minecraft-style commands to Left 4 Dead 2! This addon introduces a chat-based command system inspired by Minecraft Java Edition (1.16.5–1.21.1), allowing you to control entities, spawn items,…
Bring Minecraft-style commands to Left 4 Dead 2! This addon introduces a chat-based command system inspired by Minecraft Java Edition (1.16.5–1.21.1), allowing you to control entities, spawn items, teleport players, modify attributes, and more directly through the chat box. Simply type "/" followed by a command to execute it!
Supported Commands
- /kill — Kill or remove selected entities.
- /damage — Deal damage with configurable damage types.
- /summon — Spawn infected, items, props, and custom entities.
- /give — Give weapons or items to survivors.
- /clear — Remove items from survivors' inventories.
- /replaceitem — Replace items in specific inventory slots.
- /effect — Apply or remove status effects.
- /function — Execute built-in functions or functions registered by other VScript addons.
- /gamemode — Change a player's damage protection mode.
- /tp — Teleport entities to coordinates or other entities.
- /attribute — Read, modify, or remove ConVars, NetProps, and ScriptScope attributes.
Additional utility commands:
- /mcstatus — Display command system status and diagnostic information.
- /mcselect — Inspect entities matched by a target selector.
Command Syntax
Most commands follow the syntax of Minecraft Java Edition, so their basic usage will not be repeated here.
Minecraft command reference: Minecraft Wiki — Commands
Target selector reference: Minecraft Wiki — Target Selectors
However, several commands and selectors have been modified or extended to accommodate L4D2's Source engine.
1. Coordinate System
Minecraft uses the Y-axis for vertical height, while Source uses the Z-axis.
Therefore, this addon follows L4D2's native coordinate system:
- X — Horizontal position
- Y — Horizontal position
- Z — Vertical height
Relative coordinates (~) are supported.
Additionally, compact relative coordinates are supported, allowing "~ ~ ~" to be written as "~~~".
Examples:
/tp @s ~ ~ ~100 /tp @s ~~~ /tp @s ~100~200~ /summon tank ~ ~ ~200
All distance-related parameters use Source engine units (u).
2. Target Selectors
Supported target selectors:
- @s — The command executor.
- @a — All player entities, including survivors and Special Infected.
- @e — All entities.
- @p — The nearest player entity.
- @j — The nearest eligible entity other than the executor.
You can also specify players directly by their names without using a selector.
Supported selector arguments:
- r — Maximum distance.
- rm — Minimum distance.
- name — Entity or player name.
- type — Entity type or classname.
- x, y, z — Selector origin coordinates.
- dx, dy, dz — Selection volume dimensions.
- m — Custom gamemode.
- hasitem — Checks whether an entity carries a specified item.
- has_property — Checks a ScriptScope property and its value.
- limit/c --- Quantity.
The "!" operator can be used to invert supported selector conditions.
Examples:
/kill @e[type=infected,r=1000] /kill @e[type=!survivor] /damage @e[type=tank] 100 /give @a[r=500] weapon_rifle /tp Nick @s
Note: In L4D2, Special Infected are also player entities. Therefore, type=!player excludes Special Infected as well. Use type=!survivor if you only want to exclude survivors.
For safety, /kill will not directly remove protected map entities or equipped weapons.
3. Damage Types
Unlike Minecraft, L4D2 uses Source engine damage types.
The /damage command supports Source damage flags, including bullet, slash, burn, blast, fall, crush, shock, poison, and others.
Multiple damage types can be combined using "|".
Example:
/damage @e[type=tank] 100 bullet|burn
Actual damage may still be affected by the game's damage mechanics or other addons.
4. Items and Inventory
The /give, /clear, and /replaceitem commands have been adapted to L4D2's inventory system.
Items use L4D2 weapon and entity names, such as weapon_rifle, weapon_rifle_ak47, and weapon_first_aid_kit.
Unlike Minecraft, L4D2 does not support ordinary item stacking. Giving multiple items will attempt to perform multiple inventory operations rather than create a stack.
The /replaceitem command supports L4D2's five inventory slots:
- 0 — Primary weapon
- 1 — Secondary weapon
- 2 — Throwable
- 3 — Medical item
- 4 — Pills / adrenaline
The Minecraft-style /item replace syntax is also supported as an alternative.
5. Custom Effects
The /effect command currently supports two L4D2-specific effects:
- adrenaline — Grants the adrenaline effect, with configurable duration.
- deathing — Changes a survivor's revive count to trigger the black-and-white critical state.
- glowing --- Let entity glow.
Examples:
/effect give @s adrenaline 30 /effect give @a deathing /effect clear @s adrenaline /effect clear @a
Unlike ordinary Minecraft effects, deathing does not have a duration. It modifies the survivor's revive state.
6. Custom Gamemodes
The /gamemode command uses a custom system rather than Minecraft's Survival, Creative, Adventure, and Spectator modes.
- 0 — Normal mode.
- 1 — Semi-God mode (low-health protection).
- 2 — God mode (damage immunity).
God mode also protects players from this addon's /kill command.
Semi-God mode does not guarantee protection against every instant-kill mechanic.
7. Attribute System
The /attribute command has been significantly extended to support L4D2's scripting and engine properties.
Three attribute namespaces are available:
- convar: — Access and modify Source engine console variables.
- netprop: — Access and modify entity network properties.
- scope: — Create, read, modify, or remove entity ScriptScope properties.
Examples:
Highlights
From source dataFootprint
Rated a light load on a server.
Last update
Its author last shipped an update 18d ago.
[vscript] Minecraft-style command system for L4D2 on Nxeon
From our catalogue- One-click install
- Supported on Nxeon Left 4 Dead 2 servers. We download it from Steam Workshop, place it, and restart the server.
- Server load
- light
- Latest build
- 2026-10-17, released 2026-10-17
Game versions by loader
| Loader | Game versions | Newest |
|---|---|---|
| Workshop |
From 2 recorded builds of [vscript] Minecraft-style command system for L4D2 .
Recent builds
| Build | Released | Game versions | Loaders |
|---|---|---|---|
| 2026-10-17 | 2026-10-17 | n/a | Workshop |
| 2026-10-16 | 2026-10-16 | n/a | Workshop |
What kind of mod it is
From the catalogWeapons, items & crafting
New weapons, gear, items and the recipes to make them.
Compatibility
- Game
- Left 4 Dead 2
Verified at the source
- ✓Steam WorkshopOfficial listing, checked 2026-10-21Open ↗
- ✓Authoryshjdw, as published on Steam Workshop
- ✓LicenseNot published by the sourceFree
