Skip to content

Commit

Permalink
more player stats
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Jun 14, 2022
1 parent e9ac279 commit f39ef6f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions stats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ local function post_stats()
local players = {}
for _, player in ipairs(minetest.get_connected_players()) do
local playername = player:get_player_name()
local info = minetest.get_player_information(playername)
info.name = playername;
table.insert(players, info)
table.insert(players, {
name = playername,
info = minetest.get_player_information(playername),
hp = player:get_hp(),
breath = player:get_breath(),
physics = player:get_physics_override(),
control = player:get_player_control(),
pos = player:get_pos()
})
end

mtui.send_command({
Expand Down

0 comments on commit f39ef6f

Please sign in to comment.