1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Death counter 1.18.2

Discussion in 'Skript' started by Circuit2006, Jun 4, 2022.

Thread Status:
Not open for further replies.
  1. Circuit2006

    Circuit2006 Member

    Joined:
    Jun 4, 2022
    Messages:
    3
    Likes Received:
    0
    I am VERY new to this skripting stuff and I am trying to setup a basic Death counter,

    This is the code could anyone explain to me why it isn't working?

    variables:
    {%player%.deaths} = 0
    {%player%.total_deaths} = 0

    on join:
    broadcast "Welcome %player% to the server!"
    set {%player%.deaths} to 0

    on death:
    if attacker is a player:
    add 1 to {%player%.total_deaths}

    command /test :
    trigger:
    send " "
    send "&6&lThis is an offical test"
    send "You have {%player%.total_deaths} deaths"

    command /AddDeath [<number>]:
    trigger:
    add 1 to {%player%.total_deaths}
     
  2. Angels

    Angels Member

    Joined:
    Oct 1, 2021
    Messages:
    1
    Likes Received:
    0
    uh use this:
    EDIT: Ofc use tabs. or 2 spaces


    on join:
    set join message to "&c%player% &7has joined the server!"

    command /test :
    trigger:
    send " "
    send "&6&lThis is an offical test"
    send "You have %{deaths::%player%}% deaths"

    on death:
    if attacker is a player:
    add 1 to {deaths::%victim%}
    command /AddDeath <number>:
    trigger:
    add 1 to {deaths::%player%}
     
  3. Circuit2006

    Circuit2006 Member

    Joined:
    Jun 4, 2022
    Messages:
    3
    Likes Received:
    0
    I'd like to be able to remove a live from a player that I mention is this possible?
    EDIT: I found out after learning how to use args :emoji_slight_smile:
     
    #3 Circuit2006, Jun 5, 2022
    Last edited: Jun 5, 2022
  4. Circuit2006

    Circuit2006 Member

    Joined:
    Jun 4, 2022
    Messages:
    3
    Likes Received:
    0
    Already solved it all :emoji_slight_smile:
     
Thread Status:
Not open for further replies.

Share This Page

Loading...