What do you mean by it doesn't work? if $tps more than or equals to 10 AND $load less than or equals to 90, the server will display both messages
I want to do: If the load is over or equal 90 it should show the messages And if the tps is below or equal 10 it should show the messages...
What did i do with the if statements? I come from c++/c devoping and have no idea why else should be useful here.
Do you mean PHP: if($tps <= 10) $this->getServer()->broadcastMessage("TPS below 10");elseif($load >= 90) $this->getServer()->broadcastMessage("Load above 90");
Basically it is like a fallback system. If first condition is true, run something, but otherwise, fallback to the second condition and run something if it is true.
Thanks for the explanation I am just starting with php and that "efficient" programming (My old c++ programms liked to hang around in loops)
Welcome to PHP. This is a place where everything should only be small things and it makes no sense to use threads and do optimization and stuff. Actually, the PocketMine project was started in PHP because it was meant to be small things that wouldn't be used in production. https://botbot.me/freenode/pocketmine/2015-01-12/?msg=29344826&page=2