Skript Version (do not put latest): Skript 2.4-beta5 (btw Its a custom version but Its just a tiny changes that wont affect the skript)
Skript Author: Bensku
Minecraft Version: 1.14.4
My "on damage:" part isn;t working everytime I take damage the actionbar health doesn't sync with the player health please help me ;(
Skript Author: Bensku
Minecraft Version: 1.14.4
Code:
function actionbar(p: player):
set {_uuid} to uuid of {_p}
send actionbar "&c%{%{_uuid}%::health}%/%{%{_uuid}%::maxhealth}%❤ &a%{%{_uuid}%::defense}%❈ Defense" to {_p}
on damage:
if attacker isn't player:
set {_damage} to damage
# this part is when you get hurt and you take damage and it's in sync with the your players health and
# actionbar health for example if your player health is 8.5 hearts its going to to be like 85/100❤ or 8.2 hearts its going to be 82/100❤
if {%{_uuid}%::health} is less than or equal to 100:
remove {_damage} from {%{uuid}%::health}
remove {_damage} from player's health
bind hologram "&c-%{_damage}*2%" to victim for 1 seconds offset by 0, 1.5, 1
if {%{_uuid}%::health} is greater than or equal to 101:
remove {_damage} from {%{uuid}%::health}
# this part below makes sure that he doesn't get hurt until his actionbar health is below 100 or equal to it
# although I dont know how to do this part
set %player's health% to 10
bind hologram "&c-%{_damage}*2%" to victim for 1 seconds offset by 0, 1.5, 1
My "on damage:" part isn;t working everytime I take damage the actionbar health doesn't sync with the player health please help me ;(
Last edited: