#my skript don't work

1 messages · Page 1 of 1 (latest)

plain jay
#

i use this code

on damage:
  attackers is player
  victim is player

  combat(victim)
  combat(attacker)


function combat(p: player):

  if {combat.%{_p}%} is false:

    set {combat.cooldown.%{_p}%} to 15
    set {combat.%{_p}%} to true
    while {combat.cooldown.%{_p}%} is not 0:

      remove 1 from {combat.cooldown.%{_p}%}
      send action bar "&cIn Combat | %{combat.cooldown.%{_p}%}% Seconds Remain%" to {_p}

      if {combat.cooldown.%{_p}%} is 0:
        set {combat.%{_p}%} to false

      wait 1 second

  else:
    set {combat.cooldown.%{_p}%} to  15


on quit:
  if {combat.%player%} is true:
    kill player
    set {combat.%player%} to false
    set {combat.cooldown.%player%} to 0

on death:
  set {combat.%victim%} to false
  set {combat.cooldown.%victim%} to 0