I have tested to reset fall distance of a player whit $player->resetfallDistance(); but now on the new PMMP api don't work, how can i do that now in new version ALPHA-9..? If this functions doesn't exists anymore, please help me whit sending another code, but i just want that the player goes to the floor.
It seems to be working fine, but maybe it wasn't up to your expectations. Are you trying to make the player fall after disabling flight for the player? The function's name might be sorta misleading.
That's my code: PHP: if($args[0] == "off") { $sender->setAllowFlight(false); $sender->sendMessage("..."); $sender->resetFallDistance(); return true;
It has another way to do that? I have already maked this whit a teleport, but i don't remember how anymore.
The function resetFallDistance just sets their fall distance to 0, which means if they are high in the air and do the command, it'll kill them as their fall distance will continue to increment.