Cancel Event Help

  • 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.

gossymax

Member
Jul 9, 2022
2
0
1
23
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!"
 
https://skripthub.net/docs/?id=1143

Code:
command /kb <number>:
    usage: /kb [values]
    permission: "kb.admin"
    permission message: "&cYou don't have permission!"
    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 victim is not blocking:
        if {push} is set:
            push victim in direction of attacker with force {push}
 
Status
Not open for further replies.