Knight docs
EN ID
GitHub

Command

Command chat bertipe dengan parsing argumen otomatis.

Deklarasikan command dengan literal /nama dan argumen bertipe.

knight
player::command("/heal") {
    SetPlayerHealth(playerid, 100.0);
};

player::command("/give", int amount, string reason) {
    GivePlayerMoney(playerid, amount);
    SendClientMessage(playerid, "Menerima {amount}: {reason}");
};

player::command("/tp", float x, float y, float z) {
    SetPlayerPos(playerid, x, y, z);
};

Cara argumen di-parse

Note
Command tak dikenal dapat ditangani di player::chat atau dibiarkan ke balasan bawaan SERVER: Unknown command.