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

FloatingTextParticle

Discussion in 'Development' started by SergeyIvanov, Nov 19, 2016.

  1. SergeyIvanov

    SergeyIvanov Witch

    Messages:
    59
    GitHub:
    sergeyivanov14
    I create a FloatingTextParticle and create 2 FloatingTextParticle and fost FloatingTextParticle closed, please help.
     
  2. Harviy11

    Harviy11 Baby Zombie

    Messages:
    100
    send me code what you using to create floatingtextparticle please
     
  3. SergeyIvanov

    SergeyIvanov Witch

    Messages:
    59
    GitHub:
    sergeyivanov14
    PHP:
    $pas = new FloatingTextParticle(new Vector3($x$y 2$z), """§fВсе команды сервера");
                    
    $this->getServer()->getDefaultLevel()->addParticle($pas, [$p]);
                    
    $pas1 = new FloatingTextParticle(new Vector3($x$y 1.75$z), """§fБесплатный питомец §a/pets get wizer");
                    
    $this->getServer()->getDefaultLevel()->addParticle($pas1, [$p]);
                    
    $pas2 = new FloatingTextParticle(new Vector3($x$y 1.50$z), """§fБанк §a/bank");
                    
    $this->getServer()->getDefaultLevel()->addParticle($pas2, [$p]);
     
    Last edited by a moderator: Nov 19, 2016
  4. Harviy11

    Harviy11 Baby Zombie

    Messages:
    100
    i dont know why this dont work but you can use this
    PHP:
     $level->addParticle(new FloatingTextParticle(new Vector3(157.550566.8122.4863), ""C::GREEN ."text"), [$event->getPlayer()]);
     
  5. SergeyIvanov

    SergeyIvanov Witch

    Messages:
    59
    GitHub:
    sergeyivanov14
    Don't work:(
     
  6. Harviy11

    Harviy11 Baby Zombie

    Messages:
    100
    have u used
    PHP:
    $level $this->getServer()->getLevelByName("YourLevelName");
    ?
     
  7. SergeyIvanov

    SergeyIvanov Witch

    Messages:
    59
    GitHub:
    sergeyivanov14
    I use $this->getServer()->getDefaultLevel()
     
  8. SergeyIvanov

    SergeyIvanov Witch

    Messages:
    59
    GitHub:
    sergeyivanov14
    When i create 2 FloatingTextParticle fisrt is delete:(
     
  9. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Plugin development is not a process of sharing code snippets. Please don't blindly share people the code snippets you got to copy and paste into your plugins.
     
    HimbeersaftLP likes this.
  10. SergeyIvanov

    SergeyIvanov Witch

    Messages:
    59
    GitHub:
    sergeyivanov14
    Help please
     
  11. Harviy11

    Harviy11 Baby Zombie

    Messages:
    100
    spawn it floating text or no
     
  12. SergeyIvanov

    SergeyIvanov Witch

    Messages:
    59
    GitHub:
    sergeyivanov14
    When i join was created text3.
    $this->getServer()->getDefaultLevel()->addParticle(new FloatingTextParticle(new Vector3(128, 5 + 2, 128), "", "text"), [$e->getPlayer()]);
    $this->getServer()->getDefaultLevel()->addParticle(new FloatingTextParticle(new Vector3(128, 5 + 1.75, 128), "", "text2"), [$e->getPlayer()]);
    $this->getServer()->getDefaultLevel()->addParticle(new FloatingTextParticle(new Vector3(128, 5 + 1.50, 128), "", "text3"), [$e->getPlayer()]);
     
  13. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Please use [php][/php] tags to enclose your code.

    Also, I wonder if your floating text particles are show properly if the X coordinate is a bit different (like 1 block horizontal difference each)?
     
  14. TheKnightGamer

    TheKnightGamer Spider Jockey

    Messages:
    43
    GitHub:
    Jean-TKG
    I have work with FloatingText before there a pain.
     
  15. TheKnightGamer

    TheKnightGamer Spider Jockey

    Messages:
    43
    GitHub:
    Jean-TKG
    Please tell me the problem and I will help you.
     
  16. SergeyIvanov

    SergeyIvanov Witch

    Messages:
    59
    GitHub:
    sergeyivanov14
    When i create 2 FloatingTextParticle fisrt is delete:(
     
  17. TheKnightGamer

    TheKnightGamer Spider Jockey

    Messages:
    43
    GitHub:
    Jean-TKG
    Hmm Could I see the full codes you use in your .php file.
     
  18. SergeyIvanov

    SergeyIvanov Witch

    Messages:
    59
    GitHub:
    sergeyivanov14
    When i join was created text3.
    $this->getServer()->getDefaultLevel()->addParticle(new FloatingTextParticle(new Vector3(128, 5 + 2, 128), "", "text"), [$e->getPlayer()]);
    $this->getServer()->getDefaultLevel()->addParticle(new FloatingTextParticle(new Vector3(128, 5 + 1.75, 128), "", "text2"), [$e->getPlayer()]);
    $this->getServer()->getDefaultLevel()->addParticle(new FloatingTextParticle(new Vector3(128, 5 + 1.50, 128), "", "text3"), [$e->getPlayer()]);
     
  19. TheKnightGamer

    TheKnightGamer Spider Jockey

    Messages:
    43
    GitHub:
    Jean-TKG
    I see nothing wrong but do the FloatingText Spawns and what are you using to run your server.
     
  20. SergeyIvanov

    SergeyIvanov Witch

    Messages:
    59
    GitHub:
    sergeyivanov14
    I use Genisys.
     
  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.