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

Do jump a player

Discussion in 'Development' started by SkySeven, Feb 15, 2018.

  1. SkySeven

    SkySeven Baby Zombie

    Messages:
    145
    GitHub:
    SkySevenMC
    Hello,
    I would like to do jump a player but I don't find function in pmmp.
    How do that please ?

    thank's you in advance :)
     
  2. armagadon159753

    armagadon159753 Zombie

    Messages:
    217
    GitHub:
    armagadon159753
    I m not sure about m'y code but i think you can use this methode
    PHP:
    setMotion();
    such ass for exemple
    PHP:
    $player->setMotion(new Vector3($motionX$motionY$motionZ));
     
  3. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    There's a Living::jump() function. o_O
     
  4. TwistedAsylumMC

    TwistedAsylumMC Slime

    Messages:
    96
    GitHub:
    twistedasylummc
    such ass xDDDD
     
    xXNiceAssassinlo YT likes this.
  5. kenygamer

    kenygamer Banned Banned

    Messages:
    106
    GitHub:
    kenygamer
    As easy as Player->jump()
     
  6. armagadon159753

    armagadon159753 Zombie

    Messages:
    217
    GitHub:
    armagadon159753
    Which class use this methode?
     
  7. SkySeven

    SkySeven Baby Zombie

    Messages:
    145
    GitHub:
    SkySevenMC
    @kenygamer @PotatoeTheDev @Muqsit I already found it but it does not work for me.I think the package I used does not match (PlayerActionPacket::ACTION_JUMP)
     
  8. SkySeven

    SkySeven Baby Zombie

    Messages:
    145
    GitHub:
    SkySevenMC
    It's Living::Jump()
     
  9. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    667
    Post farming is real?!?!!?
     
  10. SkySeven

    SkySeven Baby Zombie

    Messages:
    145
    GitHub:
    SkySevenMC
    Please, do not take me for a noob, it's just that I have trouble expressing myself in English.
     
  11. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    667
    I did not say something about your grammar or generaly your english. I said that this user is post farming. I know that most of the typographic errors we do are due to auto correct. Just think that you were watching p0rn and you wrote ass and the auto correct added that word in the word directory.
     
  12. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    PHP:
    $player->jump();
    $player->updateMovement();
    If that doesn't work, replace $player->updateMovement() with
    PHP:
    $player->setMotion($player->motionX$player->motionY$player->motionZ);
     
    SkySeven likes this.
  13. SkySeven

    SkySeven Baby Zombie

    Messages:
    145
    GitHub:
    SkySevenMC
    thank's you, I will try this
     
  14. SkySeven

    SkySeven Baby Zombie

    Messages:
    145
    GitHub:
    SkySevenMC
    I can't use updateMovement() because it's a protected function and $player->setMotion() is bug :/
     
  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.