How to make custom death messages but if the weapon has a custom name like if its renamed in an anvi

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

Smiley

Member
May 8, 2020
2
0
0
23
How to make custom death messages but if the weapon has a custom name like if its renamed in an anvil. this is my skript

on death of player:
if attacker is player: if attacker is holding tool:
if tool has custom name:
send "&7%victim% &6was killed by %attacker% &6using %weapon_name%" to all players
stop
 
Code:
on death of player:
  set {weapon_name} to name of the tool
  message "&7%victim% &6was killed by %attacker% &6using {weapon_name}" to all players
Try this idk if works
Parser says it's good
Hope it helps
 
it dosent work doe
it would just say victim was killed by attacker using {weapon_name}
 
How to make custom death messages but if the weapon has a custom name like if its renamed in an anvil. this is my skript

on death of player:
if attacker is player: if attacker is holding tool:
if tool has custom name:
send "&7%victim% &6was killed by %attacker% &6using %weapon_name%" to all players
stop
Try:
code_language.skript:
on death:
    victim is a player:
        attacker is a player:
            set {_weapon} to name of attacker's tool
            broadcast "&7%victim%&6 was killed by&7 %attacker%&6 using %{_weapon}%"
 
Status
Not open for further replies.