Item Count

Discussion in 'Development' started by Pqoster, Sep 5, 2020.

  1. Pqoster

    Pqoster Silverfish

    Messages:
    16
    How do I get how many pots were left when the player died?
     
  2. TamerZ

    TamerZ Spider Jockey

    Messages:
    29
    GitHub:
    tamerkun-cuy
    OKAY. first of all, you literally post the same THREAD 3 TIMES.

    You'll get answers don't worry. But this is not gonna work.

    Instead you got an answer, you got a warn.
     
    Diduhless likes this.
  3. Pqoster

    Pqoster Silverfish

    Messages:
    16
    Sorry it was a bug.
    can you help me yes or no?
     
  4. Diduhless

    Diduhless Baby Zombie

    Messages:
    190
    GitHub:
    Diduhless
  5. Pqoster

    Pqoster Silverfish

    Messages:
    16
  6. Diduhless

    Diduhless Baby Zombie

    Messages:
    190
    GitHub:
    Diduhless
    Use Inventory->getContents() to get all the items from the inventory, then just check if any of them are potions with a simple loop.
     
    Pqoster likes this.
  7. Pqoster

    Pqoster Silverfish

    Messages:
    16
  8. Diduhless

    Diduhless Baby Zombie

    Messages:
    190
    GitHub:
    Diduhless
     
  9. I know this dosen't really help but, i will show u how this Friday, so ya know
     
  10. Levi

    Levi Skeleton

    Messages:
    943
    GitHub:
    captainleviftw
    foreach(Inventory->getContents() as $item){}
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.