#pragma once #include "TLuaEngine.h" #include namespace LuaAPI { int PanicHandler(lua_State* State); std::string LuaToString(const sol::object Value, size_t Indent = 1, bool QuoteStrings = false); void Print(sol::variadic_args); namespace MP { extern TLuaEngine* Engine; std::string GetOSName(); std::tuple GetServerVersion(); bool TriggerClientEvent(int PlayerID, const std::string& EventName, const std::string& Data); inline size_t GetPlayerCount() { return Engine->Server().ClientCount(); } void DropPlayer(int ID, std::optional MaybeReason); void SendChatMessage(int ID, const std::string& Message); void RemoveVehicle(int PlayerID, int VehicleID); void Set(int ConfigID, sol::object NewValue); bool IsPlayerGuest(int ID); bool IsPlayerConnected(int ID); void Sleep(size_t Ms); void PrintRaw(sol::variadic_args); } namespace FS { std::pair CreateDirectory(const std::string& Path); std::pair Remove(const std::string& Path); std::pair Rename(const std::string& Path, const std::string& NewPath); std::pair Copy(const std::string& Path, const std::string& NewPath); std::string GetFilename(const std::string& Path); std::string GetExtension(const std::string& Path); std::string GetParentFolder(const std::string& Path); bool Exists(const std::string& Path); bool IsDirectory(const std::string& Path); bool IsFile(const std::string& Path); std::string ConcatPaths(sol::variadic_args Args); } }