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.

Remove bow after shooting arrow

Discussion in 'Skript' started by powershooter83, Dec 24, 2019.

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

    Joined:
    Apr 20, 2018
    Messages:
    19
    Likes Received:
    0
    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
     
  2. Vorze

    Vorze Active Member

    Joined:
    Jul 10, 2017
    Messages:
    69
    Likes Received:
    2
    try this i'm not sure
    Code (Text):
    1. on projectile shoot:
    2.     if projectile is an arrow:
    3.         loop all items in player's inventory:
    4.             if loop-item doesn't contain arrow:
    5.                 remove bow from loop-player
    6.            
     
  3. powershooter83

    Joined:
    Apr 20, 2018
    Messages:
    19
    Likes Received:
    0
    it's not working. Ehm and I think the problem ist the loop-item part of the code
     
  4. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    429
    Likes Received:
    30
    Code (Text):
    1. on projectile shoot:
    2.     if projectile is an arrow:
    3.         loop all items in shooter's inventory:
    4.             if loop-item is not arrow:
    5.                 remove bow from shooter
     
Thread Status:
Not open for further replies.

Share This Page

Loading...