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.

Cancel Event Help

Discussion in 'Skript' started by gossymax, Jul 9, 2022.

Tags:
Thread Status:
Not open for further replies.
  1. gossymax

    gossymax Member

    Joined:
    Jul 9, 2022
    Messages:
    2
    Likes Received:
    0
    Hello, I am trying to make it so it cancels the push event if the player is holding a shield. I really need this skript done soon any help would be appreciated. Here is my code:

    command /kb <number>:
    usage: /kb [values]
    trigger:
    if arg-1 is set:
    if arg-1 is smaller than 31:
    set {push} to arg-1
    message "&aKB set to %{push}%"
    else:
    message "&cI can`t edge the limit of KB (30 Max)"

    on damage of a player:
    if {push} is set:
    push victim in direction of attacker with force {push}


    on command "/kb":
    player does not have permission "kb.admin"
    cancel event
    send "&cYou don't have permission!"
     
  2. Zak_Not_Zach

    Zak_Not_Zach New Member

    Joined:
    Jul 6, 2022
    Messages:
    6
    Likes Received:
    0
    command /kb <number>:
    permission: op
    usage: /kb [values]
    trigger:
    so only oped players can do it
     
  3. gossymax

    gossymax Member

    Joined:
    Jul 9, 2022
    Messages:
    2
    Likes Received:
    0
    no i wanted to have it so the skript doesnt work when the player is holding a shield
     
  4. Zak_Not_Zach

    Zak_Not_Zach New Member

    Joined:
    Jul 6, 2022
    Messages:
    6
    Likes Received:
    0
    I dont know how that would work
     
  5. roff

    roff Member

    Joined:
    Jul 15, 2021
    Messages:
    4
    Likes Received:
    0
    https://skripthub.net/docs/?id=1143

    Code (Text):
    1. command /kb <number>:
    2.     usage: /kb [values]
    3.     permission: "kb.admin"
    4.     permission message: "&cYou don't have permission!"
    5.     trigger:
    6.         if arg-1 is set:
    7.             if arg-1 is smaller than 31:
    8.                 set {push} to arg-1
    9.                 message "&aKB set to %{push}%"
    10.             else:
    11.                 message "&cI can`t edge the limit of KB (30 Max)"
    12.  
    13. on damage of a player:
    14.     if victim is not blocking:
    15.         if {push} is set:
    16.             push victim in direction of attacker with force {push}
     
Thread Status:
Not open for further replies.

Share This Page

Loading...