on death event

  • 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.

Tom1222322

Member
Feb 5, 2021
19
0
1
23
Hello everyone, I have this weird bug. A few months ago I was really into skript, etc and then I stopped playing Minecraft until now and I've made my simple kitpvp and I remember my skript working perfectly fine back then but whenever I try to load it gives me an error saying on death cannot be cancelled, but I think I remember cancelling it somehow with addon or something. Is there any way to cancel it? My code:
Code:
on death:
    set death message to ""
    if {kp.players::*} contains player:
        if attacker is set:
            send "{@prefix} Žaidėjas &c%attacker%&a nužudė &c%victim%&a!" to {kp.players::*}
            cancel event
            wait 2 ticks
            clear player's inventory
            set player's gamemode to spectator
            add 1 to {deaths.%victim%}
            add 1 to {kills.%attacker%}
            add 2 to {kp.money.%attacker%}
 
Status
Not open for further replies.