1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Solved Multiple world player count on Form

Discussion in 'Development' started by A354-PH, Jan 26, 2019.

  1. A354-PH

    A354-PH Baby Zombie

    Messages:
    186
    GitHub:
    Kizu
    Yo! How to add the player count of two or more levels/worlds on Form(FormAPI)?
     
  2. A354-PH

    A354-PH Baby Zombie

    Messages:
    186
    GitHub:
    Kizu
    BUMP
     
  3. Diduhless

    Diduhless Baby Zombie

    Messages:
    199
    GitHub:
    Diduhless
    PHP:
    $level Server->getLevelByName("name");
    $var count($firstLevel->getPlayers()) + count($secondLevel->getPlayers());
    $form->addButton($var);
     
    JohnsonK79 likes this.
  4. A354-PH

    A354-PH Baby Zombie

    Messages:
    186
    GitHub:
    Kizu
    Does $firstLevel and $secondLevel mean this?

    PHP:
    $this->getServer()->getLevelByName("name");
     
    Last edited: Jan 27, 2019
  5. Diduhless

    Diduhless Baby Zombie

    Messages:
    199
    GitHub:
    Diduhless
    Yes, use getLevelByName("here goes the name of the world");
     
  6. A354-PH

    A354-PH Baby Zombie

    Messages:
    186
    GitHub:
    Kizu
    Thank you
     
    Diduhless likes this.
  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.