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

Faction Broadcast

Discussion in 'Plugin Help' started by XxCodeRedxX, Apr 14, 2017.

  1. XxCodeRedxX

    XxCodeRedxX Witch

    Messages:
    68
    Hi there, I am using a faction plugin and I was wondering how could I make it broadcast when a player creates a faction it says $player has created a faction called $faction.

    >serverBroadcast($this->plugin->formatMessage("§7Factions> $player has created a new faction called $faction!", true));
     
  2. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    You need to define $player as a PlayerObject->getName() variable, and $faction needs to be the Faction's name. I can't provide any more help without knowing what Factions plugin you are using and all of the code that is run when a player creates a faction.
     
  3. XxCodeRedxX

    XxCodeRedxX Witch

    Messages:
    68
    It's FactionsPro
     
  4. Martti16

    Martti16 Spider

    Messages:
    14
    GitHub:
    Marttinek
    $sender->getServer()->broadcastMessage("Player $player has created a new faction: $factionName");
     
    Lorak9904 likes this.
  5. BouncyJeffer

    BouncyJeffer Spider Jockey

    Messages:
    39
    GitHub:
    bouncyjeffer
    Send me a link to the plugin and I can do it for you.
     
  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.