Message on friendly fire

master
rubenwardy 2015-09-01 18:44:55 +01:00
parent 665030b5d5
commit e078025fa5
1 changed files with 5 additions and 3 deletions

View File

@ -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)