help with the event on damage

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

DarkShiro

Member
Apr 3, 2020
1
0
1
24
I need help with this, I don't get the "&c%victim% &7died" message when the victim doesn't take damage from the attacker, no error comes up.

on damage of a player:
if damage is greater than victim's health:
cancel event
if attacker is a player:
broadcast "&c%victim% &7was slain by &a%attacker%"
else:
broadcast "&c%victim% &7died"
play sound "block.beacon.deactivate" with volume 100 to all players
send title "&c&lYOU DIED!" with subtitle "&7You are now a spectator!" to victim for 5 seconds
strike lightning effect at the victim
drop all items in victim's inventory at victim
clear inventory of victim​
 
Use the final damage value or else armor, ... does not count. So like this:
Code:
if (victim's health - final damage) < 0.1:

And please put your code in code blocks
 
Status
Not open for further replies.