Okay so im making this siri plugin but I need help for .sentence or something. example not working you /siri hi gukgkugkuguk response hi <Siri>Siri says hi back what is suppose to happen is you /siri hi gukgkugkuguk response hi gukgkugkuguk <siri> Siri says hi back
What do you exactly need help with? Give us a code or something you have made. Otherwise we can't help you.
this wont work. the .sentence it is suppose to say what you said. /siri hi DUDE response hi DUDE <siri> Hi but all it says is hi because the word after that can be made up to different words.like hi dawdw hi dude hi fart and it will still run the command
case "hello": $sentence = implode(" ", $arg); $this->api->chat->broadcast("Hello ".$sentence); $this->api->chat->broadcast("<Siri> Hello master!"); break;
PocketMine/PHP doesn't know what $sentence is. You need to define it somewhre. You can't go and just load it, when the string doesn't contain anything...
Is this your code, I suppose? PHP: public class abc{public function init(){ $this->api->console->register("siri","",array($this,"abc");}public function abc($cmd,$arg,$isser){ switch($arg[0]){case "hello":$sentence = implode(" ", $arg);$this->api->chat->broadcast("Hello ".$sentence);$this->api->chat->broadcast("<Siri> Hello master!");break; }}}