removing from player's tool not working

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

kamilleon

Member
Nov 18, 2017
48
0
6
24
Here's my code, the cooldown works fine, but removing the item from the player doesn't.


Code:
on right click:
    if name of player's tool is "&cMedikit":
        set {_várt1} to difference between {medikitvárt.%player%} and now
        if {_várt1} is less than 3 seconds:
            send "&6&lBalker&eCraft &8» &eEhhez még várnod kell %{cdmedikit.%player%}% másodpercet!"
            stop
        else:
            set {medikitvárt.%player%} to now
            set player's health to player's health+2
            remove 1 rose red from player's tool
            set {cdmedikit.%player%} to 3
            stop

every 1 second:
    loop all players:
        if {cdmedikit.%loop-player%} is set:
            set {cdmedikit.%loop-player%} to {cdmedikit.%loop-player%}-1

Skript Version: 2.3.6
Spigot Version: 1.12.2
 
Here's my code, the cooldown works fine, but removing the item from the player doesn't.


Code:
on right click:
    if name of player's tool is "&cMedikit":
        set {_várt1} to difference between {medikitvárt.%player%} and now
        if {_várt1} is less than 3 seconds:
            send "&6&lBalker&eCraft &8» &eEhhez még várnod kell %{cdmedikit.%player%}% másodpercet!"
            stop
        else:
            set {medikitvárt.%player%} to now
            set player's health to player's health+2
            remove 1 rose red from player's tool
            set {cdmedikit.%player%} to 3
            stop

every 1 second:
    loop all players:
        if {cdmedikit.%loop-player%} is set:
            set {cdmedikit.%loop-player%} to {cdmedikit.%loop-player%}-1

Skript Version: 2.3.6
Spigot Version: 1.12.2
Try removing 1 from the item amount of the tool
 
Status
Not open for further replies.