Search found 1411 matches

by Ayuto
Mon Jul 12, 2021 3:57 pm
Forum: Plugin Development Support
Topic: Can we make player jump with source python?
Replies: 6
Views: 18470

Re: Can we make player jump with source python?

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.
by Ayuto
Mon Jul 12, 2021 3:49 pm
Forum: Plugin Development Support
Topic: enable voicechat in danger zone
Replies: 8
Views: 4551

Re: enable voicechat in danger zone

Oh, I thought BroadcastVoiceData is part of a class, because you were using THISCALL, but I think you are hooking SV_BroadcastVoiceData, right? In that case your arguments were right, but the calling convention is CDECL. If args[3] is always False it can either mean that there is nothing being broad...
by Ayuto
Mon Jul 12, 2021 8:31 am
Forum: Plugin Development Support
Topic: enable voicechat in danger zone
Replies: 8
Views: 4551

Re: enable voicechat in danger zone

I think another DataType.POINTER (for the acual this-pointer) is missing in your BroadcastVoiceData hook: [DataType.POINTER, DataType.POINTER, DataType.INT, DataType.CHAR, DataType.UINT] You can also try to hook IVoiceServer::SetClientListening/GetClientListening like we did here. Maybe it always te...
by Ayuto
Sun Jun 06, 2021 12:24 pm
Forum: Development Status Updates
Topic: Development status update (May 2021)
Replies: 0
Views: 7009

Development status update (May 2021)

It's time for another development status update! ⋅ Fixes: ⋅  Fixed a couple of typos on the wiki. ⋅  Fixed MemberFunction not returning the correct return type. ⋅  Fixed issue #390. ⋅ Additions: ⋅  Added CPointServerCommand data. ⋅&nbs...
by Ayuto
Sun Jun 06, 2021 12:17 pm
Forum: Development Status Updates
Topic: Development status update (April 2021)
Replies: 0
Views: 6449

Development status update (April 2021)

It's time for another development status update! ⋅ Fixes: ⋅  Fixed TypeManager.pointer_attribute(). ⋅  Fixed a startup crash for servers affected by #175 that are launched without a console. ⋅ Additions: ⋅ Removals: ⋅ Changes: The full chan...
by Ayuto
Sun Jun 06, 2021 12:16 pm
Forum: Development Status Updates
Topic: Development status update (March 2021)
Replies: 0
Views: 6377

Development status update (March 2021)

It's time for another development status update! ⋅ Fixes: ⋅  Fixed issue #314. ⋅ Additions: ⋅ Removals: ⋅ Changes: The full changelog can be found here: https://github.com/Source-Python-Dev-Team/Source.Python/compare/master@%7B2021-03-01%7D...master@...
by Ayuto
Sun Jun 06, 2021 12:15 pm
Forum: Development Status Updates
Topic: Development status update (February 2021)
Replies: 0
Views: 6227

Development status update (February 2021)

It's time for another development status update! ⋅ Fixes: ⋅  Fixed issue #385. ⋅  Fixed issue #379. ⋅  Fixed referencing of released m_pCallingConvention on Source.Python unload. ⋅ Additions: ⋅  Added ShowMenu implementation for message hoo...
by Ayuto
Mon May 03, 2021 7:29 pm
Forum: Plugin Development Support
Topic: [Cs:s] Zombie Riot admin
Replies: 4
Views: 3219

Re: [Cs:s] Zombie Riot admin

What's the full code? Instead of implementing your own admin functionality, you might want to use SP's built-in auth Module, which is also integrated in the commands system: http://wiki.sourcepython.com/general/config-auth.html http://wiki.sourcepython.com/developing/module_tutorials/commands.html#u...
by Ayuto
Wed Apr 14, 2021 5:47 am
Forum: Plugin Releases
Topic: CircleDamageIndicator
Replies: 5
Views: 9447

Re: CircleDamageIndicator

Very cool stuff! Just one note: the PluginInfo class isn't meant to be created by the plugin. It's being created by SP, so it's also possible to retrieve information about unloaded plugins. To tell SP which information the instance should contain, you can create an info.ini file: http://wiki.sourcep...
by Ayuto
Thu Feb 18, 2021 2:00 pm
Forum: Plugin Development Support
Topic: Streaming audio to clients
Replies: 4
Views: 3953

Re: Streaming audio to clients

I'm currently unable to provide an example, but IIRC this was possible with some kind of a hidden MOTD. Maybe that helps to start the research?
by Ayuto
Fri Feb 12, 2021 6:39 pm
Forum: Plugin Development Support
Topic: [Cs:s] Ban Counter
Replies: 3
Views: 2724

Re: [Cs:s] Ban Counter

You need to take every unit into account. E. g. something like this: # A tuple that stores the seconds to unit conversion factor. UNITS = ( # You can enable/disable a unit by simply commenting it out # or remove the comment. #('month', 'months', 1 * 60 * 60 * 24 * 30), &#...
by Ayuto
Mon Feb 08, 2021 12:41 pm
Forum: Plugin Development Support
Topic: Threaded Menu crash
Replies: 7
Views: 4598

Re: Threaded Menu crash

Yeah, I thought about a mutex as well, but discarded the idea, because the best solution is to simply send the user message in the main thread. A generic solution might be to pre-hook UserMessageBegin and set the lock and post-hook MessageEnd and unlock.
by Ayuto
Sun Feb 07, 2021 3:00 pm
Forum: Plugin Development Support
Topic: Threaded Menu crash
Replies: 7
Views: 4598

Re: Threaded Menu crash

Additionally, to your PM, this might help understanding the problem: # Only an empty CS:S server is required for this test/explanation plugin. # No bots; no players. Just load this test plugin with test1 uncommented. # Then comment out test1, uncomment test2 and reload. Continue like that with test3...
by Ayuto
Sun Feb 07, 2021 8:22 am
Forum: Plugin Development Support
Topic: Threaded Menu crash
Replies: 7
Views: 4598

Re: Threaded Menu crash

Well, I have an assumption, but I would need to see the full test code (especially your Thread class). I guess it doesn't execute the menu.send() line atomically. So, a user message is started, but then the thread is being switched and another one is started. https://en.m.wikipedia.org/wiki/Context_...
by Ayuto
Sun Feb 07, 2021 6:25 am
Forum: Plugin Development Support
Topic: Threaded Menu crash
Replies: 7
Views: 4598

Re: Threaded Menu crash

Please post the full test code to reproduce the crash.
by Ayuto
Sat Feb 06, 2021 2:49 pm
Forum: General Discussion
Topic: CS:S Linux crash when dropping weapon in OnTakeDamage pre-hook
Replies: 16
Views: 14998

Re: CS:S Linux crash when dropping weapon in OnTakeDamage pre-hook

Just in case someone stumbles about this thread: the workaround with the ecx_storage is not required anymore. You can now use this instead:
http://wiki.sourcepython.com/developing ... _registers
by Ayuto
Sat Feb 06, 2021 12:11 pm
Forum: Plugin Development Support
Topic: Overlap menu's
Replies: 2
Views: 2255

Re: Overlap menu's

Yes (twice). If you have an active menu and you send another one, it gets added to the end of the queue here: https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/addons/source-python/packages/source-python/menus/base.py#L173 It doesn't get shown immediately. Only if the user or a plu...
by Ayuto
Sun Jan 31, 2021 5:23 pm
Forum: Plugin Development Support
Topic: [CS:S/CSGO] How to get list of primaries and secondaries and use able in menu?
Replies: 7
Views: 4749

Re: [CS:S/CSGO] How to get list of primaries and secondaries and use able in menu?

Here is a quick example for WeaponClassIter: from filters.weapons import WeaponClassIter print('--- All weapons: ---') for weapon in WeaponClassIter(): print(f'{weapon.name}: {weapon.cost}') print('--- Primary weapons: ---') for weapon in Weapo...
by Ayuto
Sun Jan 31, 2021 4:53 pm
Forum: Plugin Development Support
Topic: [CS:S/CSGO] How to get list of primaries and secondaries and use able in menu?
Replies: 7
Views: 4749

Re: [CS:S/CSGO] How to get list of primaries and secondaries and use able in menu?

The other keys are already accessible using the WeaponClass instance directly. But I noticed we didn't do that for the cost and item_definition_index, so I just added those attributes as well: https://github.com/Source-Python-Dev-Team/Source.Python/commit/970c8b554469e8a026b418f410f83ba60465c4df Aft...
by Ayuto
Sat Jan 30, 2021 10:38 am
Forum: Plugin Releases
Topic: [CS:S/CSGO] Zombie
Replies: 21
Views: 26373

Re: [Cs:s] Zombie

Hey, I saw you are instantiating the Player class quite often, but you are not reusing it. This is not how you are supposed to use classes in Python. So, I would like to give you a little hint. The good thing is that SP is caching the player classes, so misusing the Player class doesn't result in a ...

Go to advanced search