2015-09-07 01:25:16 -05:00
|
|
|
STAT_DUG = 1
|
|
|
|
STAT_PLACED = 2
|
|
|
|
STAT_DIED = 3
|
|
|
|
STAT_TRAVEL = 4
|
|
|
|
STAT_PK = 5
|
|
|
|
STAT_KILLS = 6
|
2015-08-18 23:32:28 -05:00
|
|
|
|
2015-09-07 01:25:16 -05:00
|
|
|
strStat = {"Nodes Dug","Nodes Placed","Died","Distance Traveled","Players Killed","Mobs Killed"}
|
2015-08-18 23:32:28 -05:00
|
|
|
|
|
|
|
minetest.register_chatcommand("stats",{
|
|
|
|
params = "",
|
|
|
|
description = "Shows players stats",
|
|
|
|
func = function(name, param)
|
|
|
|
for i,d in pairs(strStat) do
|
2015-09-07 01:25:16 -05:00
|
|
|
minetest.chat_send_player(name, d..": "..tostring(pd.get(name,i)))
|
2015-08-18 23:32:28 -05:00
|
|
|
end
|
|
|
|
end,
|
|
|
|
})
|