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!

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

Entity no hit

Discussion in 'Requests' started by iJDuhb, May 16, 2017.

  1. iJDuhb

    iJDuhb Active Member

    Joined:
    Mar 14, 2017
    Messages:
    54
    Likes Received:
    0
    Category: Miscellaneous

    Suggested name: test

    What I want:
    When a player attacks a "cow, horse, pig, sheep, bat" it will cancel it and send "cant do that."

    I have this: https://hastebin.com/kujaqipeyu.vbs

    (doesn't work)
    Ideas for commands: None

    Ideas for permissions: None

    When I'd like it by: within 1 day
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    222
    Code (Skript):
    1. on damage:
    2.     if attacker is player:
    3.         if victim is a cow or horse or pig or sheep or bat or creeper:
    4.             cancel event
    5.             message "&cYou can't do that"
     
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    222
    Thanks, It works. But I added a for it to work, else it wouldn't work ( if attacker is a player )
     

Share This Page

Loading...