invul player dont be killed if hit another invul player
This commit is contained in:
parent
503c1c3739
commit
656f82f1cb
@ -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
|
||||
|
7
init.lua
7
init.lua
@ -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") )
|
||||
|
Loading…
x
Reference in New Issue
Block a user