More questions

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: More questions

Postby L'In20Cible » Sat Sep 24, 2016 9:09 am

We should probably add some errors checking: https://github.com/Source-Python-Dev-Te ... issues/140
User avatar
Ayuto
Project Leader
Posts: 2195
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: More questions

Postby Ayuto » Sat Sep 24, 2016 9:17 am

Oh yeah, thanks! Totally forgot about that...
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: More questions

Postby decompile » Sat Sep 24, 2016 11:45 am

Nice! Gonna update that in my script.
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: More questions

Postby decompile » Wed Oct 05, 2016 5:02 pm

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
User avatar
iPlayer
Developer
Posts: 590
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

Re: More questions

Postby iPlayer » Wed Oct 05, 2016 5:18 pm

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:

Syntax: Select all

old_buttons & PlayerButtons.SPEED   # False
new_buttons & PlayerButtons.SPEED # True
Image /id/its_iPlayer
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam

Hail, Companion. [...] Hands to yourself, sneak thief. Image
User avatar
Ayuto
Project Leader
Posts: 2195
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: More questions

Postby Ayuto » Wed Oct 05, 2016 6:14 pm

The usage is also documented on the wiki:
http://wiki.sourcepython.com/developing ... atechanged
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: More questions

Postby decompile » Fri Oct 07, 2016 11:40 am

Thank you guys,

got it working :P

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 37 guests