1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Someone who can help me?

Discussion in 'Skript' started by christianmv84, Jan 3, 2018.

Thread Status:
Not open for further replies.
  1. christianmv84

    christianmv84 Active Member

    Joined:
    Jul 20, 2017
    Messages:
    50
    Likes Received:
    0
    Does anyone know why this does not work?
    Code (Skript):
    1. on death of player:
    2.     attacker is a player
    3.     if damage was caused by void:
    4.         add 1 to {kills.%player%}
    5.         add 1 to {killstreak.%player%}
    6.  
    When I shoot a person in a void he does not tell me the kill
     
  2. White

    White Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    445
    Likes Received:
    25
    Bud, do you ever learn from others on the forum? In the other thread, there were %attacker% and %victim% inside the variables. Use them.
     
  3. christianmv84

    christianmv84 Active Member

    Joined:
    Jul 20, 2017
    Messages:
    50
    Likes Received:
    0
    I use them and it still does not work so in that thread I modified it.
     
  4. Selvati

    Selvati Active Member

    Joined:
    Jun 26, 2017
    Messages:
    190
    Likes Received:
    9
    You have to use %attacker% and %victim% for fighting events instead of %player%..... this is ridiculous
     
  5. christianmv84

    christianmv84 Active Member

    Joined:
    Jul 20, 2017
    Messages:
    50
    Likes Received:
    0
    Yea bro i change and doesnt work

    Code (Skript):
    1. on death of player:
    2.     attacker is a player
    3.     if damage was caused by void:
    4.         add 1 to {kills.%attacker%}
    5.         add 1 to {killstreak.%attacker%}
     
  6. DeahtstrokeSW

    DeahtstrokeSW New Member

    Joined:
    Mar 13, 2017
    Messages:
    7
    Likes Received:
    0
    Any errors? and what is not working?
     
  7. christianmv84

    christianmv84 Active Member

    Joined:
    Jul 20, 2017
    Messages:
    50
    Likes Received:
    0
    0 errors, and it does not work because when I throw a person in a vacuum it does not give me the kill

    Code (Skript):
    1. on damage:
    2.     attacker is a player
    3.     victim is a player
    4.     set {Hitted::%victim%} to attacker
    5.     set {Hitted::%attacker%} to victim
    6.     wait 15 seconds
    7.     delete {Hitted::%victim%}
    8.     delete {Hitted::%attacker%}
    9.  
    10. on death:
    11.     if damage was caused by void:
    12.         victim is a player
    13.         if {Hitted::%victim%} is set:
    14.             set death message to "&a%victim% &7fue tirado al vacio por &c%{Hitted::%victim%}%"
    15.         else:
    16.             set death message to "&a%victim% &7se ha tirado al &cvacio"
    17.  
    18. on death of player:
    19.     attacker is a player
    20.     if damage was caused by void:
    21.         add 1 to {kills.%attacker%}
    22.         add 1 to {killstreak.%attacker%}
    --- Double Post Merged, Jan 3, 2018, Original Post Date: Jan 3, 2018 ---
    if there is someone who really knows, and that can help me and do not make me unnecessary post thanks
     
  8. FinalPlayer024

    FinalPlayer024 Active Member

    Joined:
    Oct 19, 2017
    Messages:
    95
    Likes Received:
    4
    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 (Skript):
    1. #Using "on damage" event, because it's the event needed to set the variable
    2. on damage:
    3.   attacker is a player
    4.   victim is a player
    5.   set {hitted.%victim%} to the attacker
    6. #This variable, if used, set the attacker to "the one who have to earn 1 point if victim dies"
    7.   stop
    8.  
    9. #Now using "on death" event, because it's needed to specify when Skript has to "add 1 to {kills.%attacker%}"
    10. on death:
    11.   victim is a player
    12.   attacker is a player
    13.   if damage was caused by void:
    14.     if {hitted.%victim%} is set:
    15.       send "You have been thrown in the void by %{hitted.%victim%}%!" to victim
    16.       add 1 to {kills.%{hitted.%victim%}%}
    17.       add 1 to {killstreak.%{hitted.%victim%}%}
    18.       clear {hitted.%victim%}
    19.       stop
    20.     else if {hitted.%victim%} is not set:
    21.       send "You fell in the void..." to victim
    22. #Because no one hitted the victim
    23.       stop
    24.  
    25. #I can't test it now, but it should work
     
  9. christianmv84

    christianmv84 Active Member

    Joined:
    Jul 20, 2017
    Messages:
    50
    Likes Received:
    0
    It does not work, when I shoot one empty, he says he died alone, and I throw it away myself
     
  10. FinalPlayer024

    FinalPlayer024 Active Member

    Joined:
    Oct 19, 2017
    Messages:
    95
    Likes Received:
    4
    "Shoot" with bow and arrows?
    Does it works if you hit someone using hands or swords?
     
  11. christianmv84

    christianmv84 Active Member

    Joined:
    Jul 20, 2017
    Messages:
    50
    Likes Received:
    0
    No, with all doesnt work
     
  12. White

    White Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    445
    Likes Received:
    25
    Debug. Always debug. That's the only way you'll be able to figure out your problem.
     
  13. christianmv84

    christianmv84 Active Member

    Joined:
    Jul 20, 2017
    Messages:
    50
    Likes Received:
    0
    sorry?
     
Thread Status:
Not open for further replies.

Share This Page

Loading...