Hey, I've been looking for a while and I am unable to find an answer. I'm working on a missions skript, and one of the missions is to get a kill with a bow. How would I make it so that on death it checks if the player used a bow to kill them? I've given a code which doesn't work but roughly shows what I would like it to do. Also, players can kill themselves and it counts towards it. How can I fix that too?
Thank you
Code:
on death:
victim is a player
damager is a player
if the damager's weapon is a bow:
add 1 to {bowkills.%damager%}
message "&dMissions &8| &7+1 Archer Kill" to the damager
else:
message "&dMissions &8| &7You didn't use a bow!" to the damager
Thank you