iw4x-client/src/Components/Modules/ServerCommands.hpp
Edo e49194ff65
Feature/set get stat (#485)
* [Script]: GetStat & SetStat from CoD4(x)

* [Stats] Remove limitation

* [Bullet] Clean this up
2022-09-13 20:39:45 +02:00

20 lines
432 B
C++

#pragma once
namespace Components
{
class ServerCommands : public Component
{
public:
ServerCommands();
using serverCommandHandler = std::function<bool(Command::Params*)>;
static void OnCommand(std::int32_t cmd, const serverCommandHandler& callback);
private:
static std::unordered_map<std::int32_t, serverCommandHandler> Commands;
static bool OnServerCommand();
static void CG_DeployServerCommand_Stub();
};
}