mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-08-27 04:27:42 +00:00
Add servertime lua function
This commit is contained in:
@@ -1012,6 +1012,10 @@ TLuaEngine::StateThreadData::StateThreadData(const std::string& Name, TLuaStateI
|
||||
}
|
||||
MPTable.set_function("Get", &LuaAPI::MP::Get);
|
||||
|
||||
MPTable.set_function("GetServerTimeMS", [this](const sol::this_state ts) {
|
||||
return make_object(sol::state_view(ts), this->mEngine->Server().GetServerTimeMS());
|
||||
});
|
||||
|
||||
auto UtilTable = StateView.create_named_table("Util");
|
||||
UtilTable.set_function("LogDebug", [this](sol::variadic_args args) {
|
||||
std::string ToPrint = "";
|
||||
|
||||
Reference in New Issue
Block a user