mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 23:35:41 +00:00
LuaAPI: Implement GetOSName
This commit is contained in:
parent
d7f7a81cb0
commit
ebe3630ec8
@ -8,7 +8,7 @@ void Print(sol::variadic_args);
|
||||
namespace MP {
|
||||
static inline TLuaEngine* Engine { nullptr };
|
||||
|
||||
void GetOSName();
|
||||
std::string GetOSName();
|
||||
std::tuple<int, int, int> GetServerVersion();
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,14 @@ static std::string LuaToString(const sol::object& Value) {
|
||||
}
|
||||
}
|
||||
|
||||
void LuaAPI::MP::GetOSName() {
|
||||
std::string LuaAPI::MP::GetOSName() {
|
||||
#if WIN32
|
||||
return "Windows";
|
||||
#elif __linux
|
||||
return "Linux";
|
||||
#else
|
||||
return "Other";
|
||||
#endif
|
||||
}
|
||||
|
||||
std::tuple<int, int, int> LuaAPI::MP::GetServerVersion() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user