A modern command processor for open.mp servers.
ohmycmd runs as a native open.mp component (ohmycmd.so) and gives you a clean, fast command layer with a friendly Pawn include API.
- OMC API as primary surface (
OMC_*natives) - DX-style command syntax:
cmd:,CMD,COMMANDalias:,flags:,description:
- Command policy controls:
- permission flags
- global/player cooldowns
- rate limits
- Typed argument helpers:
OMC_ArgInt,OMC_ArgFloat,OMC_ArgPlayerID,OMC_ArgString,OMC_ArgRest
- Callback pipeline hooks:
OMC_OnInitOnPlayerCommandReceivedOnPlayerCommandPerformedOMC_OnPolicyDeny
- Migration helpers for existing gamemodes (
ohmycmd_compat.inc) - Config file support for operator-level behavior tuning
- open.mp server with component loading enabled
- Linux build/runtime environment
- For many open.mp stacks: 32-bit ELF build (
ELF32) is required
git clone [email protected]:blefonix/ohmycmd.git
cd ohmycmd
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DOHMYCMD_BUILD_TESTING=ON
cmake --build build --config Release -j$(nproc)Build output:
build/ohmycmd.so
- Copy component:
cp build/ohmycmd.so /path/to/server/components/ohmycmd.so- Copy includes for your Pawn compiler include path:
cp include/ohmycmd.inc /path/to/qawno/include/
cp include/ohmycmd_compat.inc /path/to/qawno/include/- Restart server.
#include <open.mp>
#include <ohmycmd>
flags:ping(0)
alias:ping("p")
description:ping("Simple ping command")
cmd:ping(playerid, const params[])
{
SendClientMessage(playerid, 0x4AC0E0FF, "pong");
return 1;
}
public OMC_OnInit()
{
OMC_SetUsage("ping", "/ping");
return 1;
}Notes:
OMC_Init()is called automatically by include wrappers on gamemode/filterscript init.- Use
OMC_RegisterCompat/OMC_RegisterCompatExfor incremental migration scenarios.
Default config file location:
components/ohmycmd.cfg
Supported keys:
CaseInsensitivity = true
LegacyOpctSupport = true
LocaleName = "C"
UseCaching = true
LogAmxErrors = trueSee full reference: docs/config.md
Run local tests:
ctest --test-dir build --output-on-failureDrop-in fixture check:
tests/scripts/verify_dropin.shBenchmark:
./build/ohmycmd_bench_dispatch 5000 600000- Migration guide:
docs/migration.md - Runtime config:
docs/config.md - Drop-in verification:
docs/dropin-verification.md - Benchmark notes:
docs/benchmarks.md
MIT © 2026-present Nazarii Korniienko