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

Player in Config

Discussion in 'Plugin Help' started by Thanhji19, Feb 20, 2023.

  1. Thanhji19

    Thanhji19 Creeper

    Messages:
    1
    When I add the player to the config, it just replaces it with a new name. How to add multiple names without being replaced?
    Sorry my English is not good.
    Eg:
    Code:
    Steve:
       Member: steve1,steve2,....
    MyCode:
    PHP:
        public function removeplayer($player)
        {
            
    $form $this->getserver()->GetPluginManager()->getplugin("FormAPI")->createcustomform(function (player $player, array $data null){
                if(
    $data === null)
                {
                    return 
    True;
                }
                
    $name $player->getName();
                
    $this->Getserver()->dispatchcommand($player"okp remove " $data[0]);
                
    $this->data->setNested("$name.Member"$data[0]);
                
    $this->data->save();
            });
            
    $form->settitle("Remove player");
            
    $form->addinput("Input name .");
            
    $form->sendtoplayer($player);
            return 
    $form;
        }
     
  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.