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

Sign text

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

  1. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    Is it possible to set different texts for each player on a sign?
     
  2. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    faking packets should do a decent job
     
    Primus and Indexfire like this.
  3. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    Mh ok. What Packet?
     
  4. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    I tried something but I get an error
    PHP:
    $data $t->getSpawnCompound();
      
    $data->Text1 = new \pocketmine\nbt\tag\StringTag("Text1",$text[0]);
      
    $data->Text2 = new \pocketmine\nbt\tag\StringTag("Text2",$text[1]);
      
    $data->Text3 = new \pocketmine\nbt\tag\StringTag("Text3","Test");
      
    $data->Text4 = new \pocketmine\nbt\tag\StringTag("Text4",$player->getName());
      
    $nbt = new NBT(NBT::LITTLE_ENDIAN);
      
    $nbt->setData($data);
    $pk = new \pocketmine\network\protocol\EntityDataPacket();
      
    $pk->$t->getX();
      
    $pk->$t->getY();
      
    $pk->$t->getZ();
      
    $pk->namedtag $nbt->write();
      
    $player->dataPacket($pk);

    //Error: Class pocketmine\nbt\tag\StringTag not found. But it exists
     
  5. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    Hm, I do not have any idea what can it by cause by... Can you send full plugin?
     
  6. xBeastMode

    xBeastMode Shog Chips

    Messages:
    0
  7. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    Last edited: Mar 28, 2017
  8. xBeastMode

    xBeastMode Shog Chips

    Messages:
    0
    What's the API?
     
  9. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    I use the newest pmmp. And I already found the file. It exits 100%!
     
  10. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    Send full plugin
     
  11. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    No. It's in my core
     
    Marabou likes this.
  12. Marabou

    Marabou Baby Zombie

    Messages:
    137
    GitHub:
    wiligangster
    Why you want it to send its full plugin ?
    It has already sent some of its code it must be solved.
     
  13. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    Sending full plugin prepare lots of info about code.
     
  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.