Ok, so im making a skript based on the 3rd life smp and im having problems making a player on their last life be able to start pvp, so a player on their life 1 should be able to start pvp and other players on any life should be able to attack back for 20 seconds,but someone on their 2 and 3 life should not be able to start pvp.
This is what i have now: (This is only the damage section that i need help with)
on damage:
victim is player
attacker is player
if {lives.%attacker%} is 1:
set {can attack.%victim%} to yes
if {can attack.%victim%} is no:
cancel event
if {can attack.%victim%} is yes:
set {can attack.%victim%} to yes
wait 20 seconds
set {can attack.%victim%} to no
In this case someone on their life 1 can attack but people on their 2 and 3 life can't attack back, How do i fix this?
This is what i have now: (This is only the damage section that i need help with)
on damage:
victim is player
attacker is player
if {lives.%attacker%} is 1:
set {can attack.%victim%} to yes
if {can attack.%victim%} is no:
cancel event
if {can attack.%victim%} is yes:
set {can attack.%victim%} to yes
wait 20 seconds
set {can attack.%victim%} to no
In this case someone on their life 1 can attack but people on their 2 and 3 life can't attack back, How do i fix this?