2022-09-26 12:22:06 +03:00
2022-09-26 12:21:09 +03:00
2022-09-25 14:01:17 +03:00
///
2022-09-26 12:22:06 +03:00
2022-09-25 22:37:01 +03:00
2022-09-25 23:00:43 +03:00

CommandEngine

About

  • Status: WIP

CommandEngine is plugin for BeamMP.
Plugin for handle commands from client chat or server console.

Wiki

Installation
Copy CommandEngine dir to Resources/Server/

Add command to engine


-- Plugin body 

function onInit()
    
    -- Plugin init then

    -- Firstly: Wait to mod initialization
    log("Wait CommandEngine init..")
    local isCommandEngineReady = false
    while not isCommandEngineReady do
        local Future = MP.TriggerGlobalEvent("CE_isReady")
        while not Future:IsDone() do MP.Sleep(100) end
        local result = Future:GetResults()
        if result[1] == true then isCommandEngineReady = true end
    end

    -- Secondary: Register commands 
    MP.TriggerGlobalEvent("CE_addCommand", {
            ban = { "banUser", "a", { "ban  <name> [reason]", "Ban user." }},
            unban = { "unbanUser", "a", { "unban <name>", "Unban user." }},
            banlist = { "seeBanList", "a", "See ban list on server."}
        }
    )
    
end 

This is real example from AdminTools

Description
No description provided
Readme 52 KiB
Languages
Lua 100%