Can we make player jump with source python?

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
khaimovmr
Member
Posts: 36
Joined: Fri Aug 25, 2017 3:15 am
Contact:

Can we make player jump with source python?

Postby khaimovmr » Mon Jul 12, 2021 2:46 pm

So, basically, the subject.
I need to trigger player jump at one moment with some forward velocity.
Did some of you guys do somethingn like this?
Last edited by khaimovmr on Mon Jul 12, 2021 2:49 pm, edited 1 time in total.
Speed0x
Member
Posts: 84
Joined: Sun Feb 05, 2017 4:55 pm

Re: Can we make player jump with source python?

Postby Speed0x » Mon Jul 12, 2021 2:49 pm

just search the forums for it. i think there a many topics about it.
User avatar
khaimovmr
Member
Posts: 36
Joined: Fri Aug 25, 2017 3:15 am
Contact:

Re: Can we make player jump with source python?

Postby khaimovmr » Mon Jul 12, 2021 2:51 pm

Speed0x wrote:just search the forums for it. i think there a many topics about it.

Did it. No luck so far.
Speed0x
Member
Posts: 84
Joined: Sun Feb 05, 2017 4:55 pm

Re: Can we make player jump with source python?

Postby Speed0x » Mon Jul 12, 2021 3:31 pm

look for onplayerruncommand for forcing the jump.
depending on what you want to with the velocity you could inject into the Event('player_jump').

i think this post can be useful or you can give more info on what exactly you want to be done.
viewtopic.php?f=7&t=2113&p=14350&hilit=velocity#p14350
User avatar
Ayuto
Project Leader
Posts: 2147
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: Can we make player jump with source python?

Postby Ayuto » Mon Jul 12, 2021 3:57 pm

Yes, you can either inject the jump button in PlayerRunCommand (maybe Player.buttons works as well) or emulate a jump e. g. by using Player.push.
User avatar
khaimovmr
Member
Posts: 36
Joined: Fri Aug 25, 2017 3:15 am
Contact:

Re: Can we make player jump with source python?

Postby khaimovmr » Fri Jul 16, 2021 8:41 am

That's absolutely insane, guys! Thank you. Will try on this weekend.

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 6 guests