Solved Now how I damage zombies

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

    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.
Feb 24, 2017
191
7
0
foroendertheth.foroactivo.com
code_language.skript:
command /test <text>:
    trigger:
        if arg 1 is "gun":
            give a stone sword named "&aGun" to the player
on rightclick:
    held item of the player is a stone sword named "&aGun":
        shoot an snowball in direction of the player
Plis not damage other players just mobs especiality zombies
 
code_language.skript:
on damage:
    if damage cause is a projectile:
        if projectile is a snowball:
            if name of attacker's held item is "&aGun":
                if victim is a zombie:
                    stop
                else:
                    cancel the event
 
Last edited by a moderator:
code_language.skript:
on projectile hit:
    shooter is a player
    if name of shooter's held item is a stone sword named "&aGun":
        if projectile is a snowball:
            if victim is a zombie:
                stop
            else:
                set damage to 0
Thanks later i test And I give best answere
 
Status
Not open for further replies.