From e078025fa589d12d631b231ac4c090bd72d46fbd Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Tue, 1 Sep 2015 18:44:55 +0100 Subject: [PATCH] Message on friendly fire --- ctf/teams.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ctf/teams.lua b/ctf/teams.lua index 61587a3..3a7be6b 100644 --- a/ctf/teams.lua +++ b/ctf/teams.lua @@ -426,8 +426,10 @@ minetest.register_on_punchplayer(function(player, hitter) local to = ctf.player(player:get_player_name()) local from = ctf.player(hitter:get_player_name()) - if not ctf.setting("friendly_fire") and to.team == from.team and - to.team ~= "" and to.team ~= nil then - return true + if to.team == from.team and to.team ~= "" and to.team ~= nil then + minetest.chat_send_player(from:get_player_name(), to:get_player_name() .. " is on your team!") + if not ctf.setting("friendly_fire") then + return true + end end end)