how do i detect if a player killed themselves?

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

Zeoroan

New Member
Jun 13, 2024
6
1
3
24
im not too sure on how to detect if a player has killed themselves, and i wanted to seek guidance
 
Code:
on damage:
    if victim is attacker:
        cancel event

on place lava on player location:
[tab]cancel event
#if this not work, try to compare event-location with player-location

I don't know how to be sure if a player committed suicide in another modes.
 
Last edited:
Code:
on death:
  if attacker is a player:
    set {_player} to %victim%
    if %{_player}% is %attacker%:
this detects if the attacker is the player type the other code below if you have an error send them to me!
 
Code:
on death:
  if attacker is a player:
    set {_player} to %victim%
    if %{_player}% is %attacker%:
this detects if the attacker is the player type the other code below if you have an error send them to me!
oh alright, and thanks