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

How to make chat plugin like /say

Discussion in 'Plugin Help' started by AmalCraft, Jul 22, 2020.

  1. AmalCraft

    AmalCraft Creeper

    Messages:
    5
    Hello, i am making GTA 5 roleplay server in pocketmine and im figuring out how to make plugin that looks like /say but i want to make it /tweet. So if i run /tweet and message it will be "[Twitter] [Name] (Message)" just like /say. Thanks and sorry for terribe english
     
  2. GodWeedZao

    GodWeedZao Zombie Pigman

    Messages:
    401
    GitHub:
    godweedzao
    $this->getServer()->sendbroadcastmessage("[TWITER]");
    and use args to send you msg, setprefix to solved if you dont need more help
     
  3. David Flash

    David Flash Spider Jockey

    Messages:
    26
    GitHub:
    davidflashcz
    If you also want to get the player’s name, use:

    PHP:
    $this->getServer()->sendbroadcastmessage([Twitter. <$player>->getName() .” [args]);
    Replace “<$player>” with your player variable
     
  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.