Code:
on death:
if victim is "green":
broadcast "%{green_team}%"
remove 1 from {green_team}
if {green_team} is equal to 0:
broadcast "green wins"
end_game()
if victim is "purple":
broadcast "%{purple_team}%"
remove 1 from {purple_team}
if {purple_team} is equal to 0:
broadcast "purple wins"
end_game()
I tried using "if victim is <team name>", but it doesn't seem to work,
NOTE: {green/purple_team} are a counter of how many players there are in that team.
NOTE 2: I am using the vanilla team system, no special addons added
I just want to check if a player is in team purple or team green and execute the code accordingly.
Last edited by a moderator: