Remove bow after shooting arrow

  • 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.
Apr 20, 2018
19
0
0
25
Hello, I want to make that if a player throw an arrow, and then the player has no arrows left, the bow will be deleted.


on projectile shoot:
if player has arrow:
remove bow from player
 
try this i'm not sure
Code:
on projectile shoot:
    if projectile is an arrow:
        loop all items in player's inventory:
            if loop-item doesn't contain arrow:
                remove bow from loop-player
 
Code:
on projectile shoot:
    if projectile is an arrow:
        loop all items in shooter's inventory:
            if loop-item is not arrow:
                remove bow from shooter
 
Status
Not open for further replies.