mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 23:35:41 +00:00
fix luatable in GetPlayerIdentifiers
This commit is contained in:
parent
261aa8f320
commit
7a3848e640
@ -353,12 +353,13 @@ int lua_GetIdentifiers(lua_State* L) {
|
||||
auto IDs = MaybeClient.value().lock()->GetIdentifiers();
|
||||
if (IDs.empty())
|
||||
return 0;
|
||||
lua_newtable(L);
|
||||
LuaTable::Begin(L);
|
||||
for (const std::string& ID : IDs) {
|
||||
lua_pushstring(L, ID.substr(0, ID.find(':')).c_str());
|
||||
LuaTable::BeginEntry(L, ID.substr(0, ID.find(':')).c_str());
|
||||
lua_pushstring(L, ID.c_str());
|
||||
lua_settable(L, -3);
|
||||
LuaTable::EndEntry(L);
|
||||
}
|
||||
// LuaTable::End(L, "");
|
||||
} else
|
||||
return 0;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user