Solved Cant get this to work

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

zainmz

Member
Apr 29, 2017
22
1
0
25
Hello , Im working on a jail stick and unable to get it work , there are no errors aswell.

Code:
on damage of a player:
    if attacker's tool is {@jailstick}:
        if victim is a player:
            if attacker has permission "police.use":
                set {%attacker%.usedstick} to now
                set {%attacker%jailstick.waited} to difference between {%attacker%.usedstick} and now
                if {%attacker%jailstick.waited} is more than 60 seconds:
                    execute console command "/jail %victim% jail1 10m"
                else:
                    message "&0[&1POLICE&0]&a You have to wait %%difference between 60 seconds and {%attacker%jailstick.waited}%% before you can use the Jail stick again"
 
hmm instead of if attacker's tool is {@jailstick} use if player held item is stick named "JailStick"
should work hopefully
 
Status
Not open for further replies.