CommandBuilder is a MetaHookSv plugin for Sven Co-op that provides an interactive control panel for constructing and executing engine and admin commands using dynamic macros and queue execution.
CommandBuilder combines an interactive player and preset browser with a live console bar. Selecting a player and command preset automatically evaluates dynamic macros (SteamID, player name, crosshair raycast coordinates) into a complete console command ready for instant execution or batch queuing.
- Direct Mode: Selecting a player and preset populates the console command bar. Pressing ENTER or clicking Send executes the command directly in the game console.
- Batch Queue: Build multi-command sequences and dispatch them sequentially with 50ms intervals to prevent server rate limiting.
- Raycast Coordinates: Live 3D crosshair raycast tracing (
{aim}) calculates world impact coordinates (X Y Z). - SteamID Conversion: Automatic math conversion of SteamID64 into SteamID2 (
STEAM_0:X:Y) and SteamID3 ([U:1:Z]) formats. - JSON Configuration: Configurable command presets stored in
commandbuilder/presets.json.
| Command | Description |
|---|---|
commandbuilder |
Open / close interface panel |
bind "f6" "commandbuilder"
Macro names are case-insensitive.
{playername}— Target player name.{steamid}— Target player SteamID2 (e.g.STEAM_0:1:123456).{steamid64}— Target player 64-bit SteamID.{steamid3}— Target player SteamID3 (e.g.[U:1:246912]).{playernum}— Target player server slot index (1–32).
{me}— Local player name.{mysteamid}— Local player SteamID2.{myorigin}— Local player 3D origin (X Y Z).
{aim}— 3D world impact coordinates of crosshair raycast (X Y Z).{aim_x},{aim_y},{aim_z}— Individual X, Y, Z components of raycast collision point.{vec3},{input}— Prompt user for custom input parameter via modal dialog.
{date},{time}— Local date (YYYY-MM-DD) and time (HH:MM:SS).{unixtime}— Current Unix timestamp.
Presets file is loaded using the following priority order:
svencoop_addon/commandbuilder/presets.jsonsvencoop/commandbuilder/presets.jsoncommandbuilder_presets.json(game root)
{
"presets": [
{
"id": "tp_to_aim",
"label": "Teleport Player to Aim",
"category": "Teleport",
"template": "say !tp {playername} {aim}",
"perPlayer": true,
"description": "Teleports selected player to crosshair raycast location"
},
{
"id": "ban_5m",
"label": "Ban 5 Minutes",
"category": "Moderation",
"template": "amx_ban \"{steamid}\" 5 \"{input}\"",
"perPlayer": true,
"description": "Bans selected player by SteamID for 5 minutes with reason prompt"
}
]
}Build using Visual Studio targeting Win32 (x86) within MetaHookSv solution:
- Open MetaHookSv solution in Visual Studio.
- Select
ReleaseorDebug(Win32). - Build
CommandBuilderproject.