invul player dont be killed if hit another invul player

master
Nathaniel Freeman 2021-07-24 14:24:20 +02:00
parent 503c1c3739
commit 656f82f1cb
2 changed files with 5 additions and 4 deletions

View File

@ -12,7 +12,7 @@
~/grant <player> pvpinvul~
You have the ~pvpinvul_kill_hitter~ option in mod settings, if enable, kill players that hit when have the priv.
You have the ~pvpinvul_kill_hitter~ option in mod settings, if enable, players that hit will be killed.
** Copying

View File

@ -49,10 +49,11 @@ core.register_on_punchplayer(
local player_name = player:get_player_name()
local hitter_name = hitter:get_player_name()
local invul = core.check_player_privs(player_name, {pvpinvul=true})
local player_invul = core.check_player_privs(player_name, {pvpinvul=true})
local hitter_invul = core.check_player_privs(hitter_name, {pvpinvul=true})
if invul then
if kill_hitter then
if player_invul then
if kill_hitter and not hitter_invul then
hitter:set_hp(0)
end
core.chat_send_player(hitter_name, S("You can not hurt a God") )