Someone who can help me?

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

christianmv84

Active Member
Jul 20, 2017
50
0
0
59
Does anyone know why this does not work?
code_language.skript:
on death of player:
    attacker is a player
    if damage was caused by void:
        add 1 to {kills.%player%}
        add 1 to {killstreak.%player%}

When I shoot a person in a void he does not tell me the kill
 
Bud, do you ever learn from others on the forum? In the other thread, there were %attacker% and %victim% inside the variables. Use them.
 
You have to use %attacker% and %victim% for fighting events instead of %player%..... this is ridiculous
 
You have to use %attacker% and %victim% for fighting events instead of %player%..... this is ridiculous

Yea bro i change and doesnt work

code_language.skript:
on death of player:
    attacker is a player
    if damage was caused by void:
        add 1 to {kills.%attacker%}
        add 1 to {killstreak.%attacker%}
 
Any errors? and what is not working?

0 errors, and it does not work because when I throw a person in a vacuum it does not give me the kill

code_language.skript:
on damage:
    attacker is a player
    victim is a player
    set {Hitted::%victim%} to attacker
    set {Hitted::%attacker%} to victim
    wait 15 seconds
    delete {Hitted::%victim%}
    delete {Hitted::%attacker%}

on death:
    if damage was caused by void:
        victim is a player
        if {Hitted::%victim%} is set:
            set death message to "&a%victim% &7fue tirado al vacio por &c%{Hitted::%victim%}%"
        else:
            set death message to "&a%victim% &7se ha tirado al &cvacio"

on death of player:
    attacker is a player
    if damage was caused by void:
        add 1 to {kills.%attacker%}
        add 1 to {killstreak.%attacker%}
[doublepost=1514989720,1514970865][/doublepost]if there is someone who really knows, and that can help me and do not make me unnecessary post thanks
 
In a few words, you have to set a variable before the victim falls in the void, so in "on death" event, you can call it back and give him a reward


code_language.skript:
#Using "on damage" event, because it's the event needed to set the variable
on damage:
  attacker is a player
  victim is a player
  set {hitted.%victim%} to the attacker
#This variable, if used, set the attacker to "the one who have to earn 1 point if victim dies"
  stop

#Now using "on death" event, because it's needed to specify when Skript has to "add 1 to {kills.%attacker%}"
on death:
  victim is a player
  attacker is a player
  if damage was caused by void:
    if {hitted.%victim%} is set:
      send "You have been thrown in the void by %{hitted.%victim%}%!" to victim
      add 1 to {kills.%{hitted.%victim%}%}
      add 1 to {killstreak.%{hitted.%victim%}%}
      clear {hitted.%victim%}
      stop
    else if {hitted.%victim%} is not set:
      send "You fell in the void..." to victim
#Because no one hitted the victim
      stop

#I can't test it now, but it should work
 
In a few words, you have to set a variable before the victim falls in the void, so in "on death" event, you can call it back and give him a reward


code_language.skript:
#Using "on damage" event, because it's the event needed to set the variable
on damage:
  attacker is a player
  victim is a player
  set {hitted.%victim%} to the attacker
#This variable, if used, set the attacker to "the one who have to earn 1 point if victim dies"
  stop

#Now using "on death" event, because it's needed to specify when Skript has to "add 1 to {kills.%attacker%}"
on death:
  victim is a player
  attacker is a player
  if damage was caused by void:
    if {hitted.%victim%} is set:
      send "You have been thrown in the void by %{hitted.%victim%}%!" to victim
      add 1 to {kills.%{hitted.%victim%}%}
      add 1 to {killstreak.%{hitted.%victim%}%}
      clear {hitted.%victim%}
      stop
    else if {hitted.%victim%} is not set:
      send "You fell in the void..." to victim
#Because no one hitted the victim
      stop

#I can't test it now, but it should work

It does not work, when I shoot one empty, he says he died alone, and I throw it away myself
 
Debug. Always debug. That's the only way you'll be able to figure out your problem.
 
Status
Not open for further replies.