Hello. I want to cancel the pvp event if the player is on the same team as other player.
This is my code:
But I've tried to set up it like this and doesn't work:
Does some of yo know how to fix this?
This is my code:
Code:
command /red:
trigger:
if {ir.red.%player%} is false:
if {ir.red} < 8:
if {ir.red.%player%}:
add -1 to {ir.bluee}
add 1 to {ir.red}
set {ir.red.%player%} to true
set {ir.bluee.%player%} to false
message "&7You have joined the &cRed &7team"
set player's tab list name to "&c%player%"
But I've tried to set up it like this and doesn't work:
Code:
on damage:
if {ir.red::%victim%} is "%{ir.red::%attacker%}%":
cancel event
send "&cYou can't hurt your teammates!" to attacker
Does some of yo know how to fix this?