Record kills
This commit is contained in:
parent
f952112be0
commit
6fdfb28f37
2 changed files with 10 additions and 1 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 370c6edd65d4968e66257408f5b782412a394ee6
|
Subproject commit cbb838eb40cf66bc2a8e5abaf694088e84f81b4c
|
|
@ -125,6 +125,15 @@ ctf_flag.register_on_precapture(function(name, flag)
|
||||||
return true
|
return true
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
ctf.register_on_killedplayer(function(victim, killer)
|
||||||
|
local main, match = ctf_stats.player(killer)
|
||||||
|
if main and match then
|
||||||
|
main.kills = main.kills + 1
|
||||||
|
match.kills = match.kills + 1
|
||||||
|
ctf.needs_save = true
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
minetest.register_on_dieplayer(function(player)
|
minetest.register_on_dieplayer(function(player)
|
||||||
local main, match = ctf_stats.player(player:get_player_name())
|
local main, match = ctf_stats.player(player:get_player_name())
|
||||||
if main and match then
|
if main and match then
|
||||||
|
|
Loading…
Reference in a new issue