Fix online time export in 2.0 w backwards compat

This commit is contained in:
Danielv123 committed 2025-02-16 13:34:35 +01:00
1 parent fbdf206e31
commit 5d37712db4
1 file changed
+5 -1
+5 -1
View File
@@ -416,7 +416,11 @@ local players = {}
for _, p in pairs(game.players) do
players[p.name] = p.online_time
end
rcon.print(game.table_to_json(players))`.replace(/\r?\n/g, " ");
if helpers ~= nil then
rcon.print(helpers.table_to_json(players))
else
rcon.print(game.table_to_json(players))
end`.replace(/\r?\n/g, " ");
let playerTimes: Record<string, number> = JSON.parse(await this.sendRcon(exportPlayerTimes));
let count = 0;