More questions
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: More questions
We should probably add some errors checking: https://github.com/Source-Python-Dev-Te ... issues/140
Re: More questions
Oh yeah, thanks! Totally forgot about that...
Re: More questions
Nice! Gonna update that in my script.
Re: More questions
Hey,
After checking out the new OnButtonStateChanged, I realy cant start something with its args..
Im still using the old way you posted few posts earlier.
Wouldn't it make much more sense to its name, when you just give out the (player, button(AND MAYBE its status if its pressed or not?)). I currently have no idea what i can do with old_buttons and new_buttons
After checking out the new OnButtonStateChanged, I realy cant start something with its args..
Im still using the old way you posted few posts earlier.
Wouldn't it make much more sense to its name, when you just give out the (player, button(AND MAYBE its status if its pressed or not?)). I currently have no idea what i can do with old_buttons and new_buttons
Re: More questions
It fires when player presses or releases one of their buttons. new_buttons is your user_cmd.buttons from the "old way". old_buttons is the buttons as they were before player pressed or released one (or several) of them.
E.g. if player has just pressed the [Shift] key:
E.g. if player has just pressed the [Shift] key:
Syntax: Select all
old_buttons & PlayerButtons.SPEED # False
new_buttons & PlayerButtons.SPEED # True

My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam
Hail, Companion. [...] Hands to yourself, sneak thief.

Re: More questions
The usage is also documented on the wiki:
http://wiki.sourcepython.com/developing ... atechanged
http://wiki.sourcepython.com/developing ... atechanged
Re: More questions
Thank you guys,
got it working :P
got it working :P
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 66 guests