Run function in background

Discussion in 'Development' started by LucGamesDE, Mar 18, 2017.

  1. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    Mh. Ok
     
  2. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    And when I transfer a player to a different server I check the status of it.

    But how can I get the status in there?
    PHP:
    if ($status == "online") {
    //transfer
    }
     
  3. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    passed in
    PHP:
    public function onComplete($data,$status){
    $player =$this->getPlayerByName($data['player']);
    if (!
    $player instanceof Player)return;
    if 
    $status == "online"
    $this->transfer($player,$data['server_ip']);
    }
     

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.