Death counter 1.18.2

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

Circuit2006

New Member
Jun 4, 2022
6
0
1
17
wrenchy.org
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}
 
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%}
 
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%}

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:
 
Last edited:
Status
Not open for further replies.