Ty so much and u know How to add attacker is a player in this context

  • 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
How to add attacker is a player in this context

code_language.skript:
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%}%"
            add 1 to {deaths.%victim%}
        else:
            set death message to "&a%victim% &7se ha tirado al &cvacio"
 
How to add attacker is a player in this context

code_language.skript:
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%}%"
            add 1 to {deaths.%victim%}
        else:
            set death message to "&a%victim% &7se ha tirado al &cvacio"
Not 100% sure what you mean, but could you not just include "attacker is a player" as you did for the victim?
Or is something else wrong with the code?
 
Not 100% sure what you mean, but could you not just include "attacker is a player" as you did for the victim?
Or is something else wrong with the code?

Sorry me explain, the code is fine I just want to add to the code that

code_language.skript:
attacker is a player
    add 1 to {kills.%attacker%}
    add 1 to {killstreak.%attacker%}
 
Sorry me explain, the code is fine I just want to add to the code that

code_language.skript:
attacker is a player
    add 1 to {kills.%attacker%}
    add 1 to {killstreak.%attacker%}
Are you just not sure where to put it, is that it? It can go pretty much wherever, bearing in mind the code is executed in the order of top to bottom. if you want it to not stop up your code by making it mandatory the attacker be a player, then make it an "if" statement
code_language.skript:
if attacker is a player:
    add 1 to {kills.%attacker%}
    add 1 to {killstreak.%attacker%}
 
Are you just not sure where to put it, is that it? It can go pretty much wherever, bearing in mind the code is executed in the order of top to bottom. if you want it to not stop up your code by making it mandatory the attacker be a player, then make it an "if" statement
code_language.skript:
if attacker is a player:
    add 1 to {kills.%attacker%}
    add 1 to {killstreak.%attacker%}

yea thanks! <3 but can u add on my code?

code_language.skript:
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%}%"
            add 1 to {deaths.%victim%}
        else:
            set death message to "&a%victim% &7se ha tirado al &cvacio"

behind the add 1 to {deaths.%victim%} please
 
Put it under "victim is a player"

code_language.skript:
on death:
    if damage was caused by void:
        victim is a player
    if attacker is a player:
        add 1 to {kills.%attacker%}
        add 1 to {killstreak.%attacker%}
        if {Hitted::%victim%} is set:
            set death message to "&a%victim% &7fue tirado al vacio por &c%{Hitted::%victim%}%"
            add 1 to {deaths.%victim%}
        else:
            set death message to "&a%victim% &7se ha tirado al &cvacio"

Doesnt work

When I throw a person in a vacuum it does not work, before
 
code_language.skript:
on death:
    if damage was caused by void:
        victim is a player
    if attacker is a player:
        add 1 to {kills.%attacker%}
        add 1 to {killstreak.%attacker%}
        if {Hitted::%victim%} is set:
            set death message to "&a%victim% &7fue tirado al vacio por &c%{Hitted::%victim%}%"
            add 1 to {deaths.%victim%}
        else:
            set death message to "&a%victim% &7se ha tirado al &cvacio"

Doesnt work

When I throw a person in a vacuum it does not work, before
Provide some more information. Which portion exactly isn't working?
[doublepost=1514935802,1514935748][/doublepost]
Provide some more information. Which portion exactly isn't working?
ah, also indent line 4,5 and 6.
it needs to be under your void condition
 
Provide some more information. Which portion exactly isn't working?

When I throw a person in a vacuum it does not work, before
When you have a player in a vacuum, he says he died
[doublepost=1514935969,1514935834][/doublepost]I throw a player to the void, and he says that I call it empty, but he does not say he was thrown into the void by
 
Status
Not open for further replies.