Make player blind

Discussion in 'Development' started by Dyntes, Oct 2, 2020.

  1. Dyntes

    Dyntes Spider Jockey

    Messages:
    44
    GitHub:
    Dyntes
    Hey, do anyone know how to make a player doesn't see anything even their hand.. When I use blind effect the player still able to see a small area but I want the player can't see anything even a small area. If anyone know how to make that happen tell me as soon as posible.
     
  2. Have you tried to put the effect amplifier to like 999 ?

    And for the player to doesen't see himself,

    You can do:

    - If you want that all players can see the target but the target can't see himself:
    PHP:
    /* $player is the player with blindness */

    $player->hidePlayer($player);
    And if you want to no one even the target to see him, just add invisibility effect to the target
     
  3. Dyntes

    Dyntes Spider Jockey

    Messages:
    44
    GitHub:
    Dyntes
    I don't want to make the player invisible but I want to make the player blind that can see nothing
     
  4. Dyntes

    Dyntes Spider Jockey

    Messages:
    44
    GitHub:
    Dyntes
    How to make the hide fuction for all player? Is...
    PHP:
    $allPlayer $this->getServer()->getOnlinePlayers();
    $player->hide($allPlayer);
    //Is like this?? But getOnlinePlayer() fuction will return to array so how to get all of the online player?
     
  5. Matrox

    Matrox Slime

    Messages:
    91

    PHP:
    foreach($this->getServer()->getOnlinePlayers() as $otherplayer){
         
    $player->hide($otherplayer);
    }
     
  6. Dyntes

    Dyntes Spider Jockey

    Messages:
    44
    GitHub:
    Dyntes
    So... I can use foreach() function to execute every elements on array, right?
     
  7. Matrox

    Matrox Slime

    Messages:
    91
  8. GamingFR91

    GamingFR91 Spider

    Messages:
    11
    GitHub:
    GamingFR91
    It will hide allplayers and the target to blind too.
    And it will hide all players, then nobody can see one of them
     
  9. Primus

    Primus Zombie Pigman

    Messages:
    460
    Put player's head inside a block?
     
    THXC and minijaham like this.

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.