Search found 1271 matches

by Ayuto
Mon Feb 24, 2020 8:48 pm
Forum: General Discussion
Topic: [Q/DEV] UserInfo method
Replies: 2
Views: 843

Re: [Q/DEV] UserInfo method

by Ayuto
Sat Feb 22, 2020 9:13 am
Forum: Development Status Updates
Topic: Development status update (January 2020)
Replies: 0
Views: 69

Development status update (January 2020)

It's time for another development status update! :smile: ⋅ Fixes: ⋅  Fixed issue #298. ⋅  Fixed issue #293. ⋅ Additions: ⋅  Added Entity.repeat(). ⋅  Added Player.from_userid() caching. ⋅ Removals: ⋅ Changes: The full ch...
by Ayuto
Sun Jan 26, 2020 10:56 am
Forum: Plugin Development Support
Topic: Problems with hooking.
Replies: 2
Views: 253

Re: Problems with hooking.

Could you please post the full test code, so tests can be done using exactly the same code and doesn't require us to complement your snippets?
by Ayuto
Sat Jan 25, 2020 10:08 am
Forum: Development Status Updates
Topic: Development status update (December 2019)
Replies: 0
Views: 871

Development status update (December 2019)

It's time for another development status update! :smile: ⋅ Fixes: ⋅  Fixed _EntityCaching not respecting the default caching state of Entity's subclasses unless explicitly specified on instantiation. ⋅ Additions: ⋅  Added Player.net_info. ⋅ Removals:...
by Ayuto
Sat Jan 25, 2020 9:59 am
Forum: Plugin Development Support
Topic: Difference in float numbers.
Replies: 5
Views: 466

Re: Difference in float numbers.

Can't tell you if your calculation is correct, because the relevant information is missing in your post, but this also seems like a loss of accuracy to me. This might surprise you:

Syntax: Select all

>>> 0.3 - 0.1
0.19999999999999998
by Ayuto
Sun Jan 19, 2020 8:20 am
Forum: Plugin Development Support
Topic: Byte patch
Replies: 2
Views: 277

Re: Byte patch

Yes, we have developed a feature rich module for various memory hacking operations. http://wiki.sourcepython.com/developing/modules/memory.html#module-memory If you want to byte-patch a binary in memory, you first need to get the binary using find_binary, then search for the location where you would...
by Ayuto
Tue Jan 14, 2020 11:27 pm
Forum: Plugin Development Support
Topic: Get SendProp instance
Replies: 7
Views: 541

Re: Get SendProp instance

That's a little bit contrary to what you wanted to achieve in your initial post. It says you want to stop data table warnings and your code example shows only the part that sends the warning :confused: I sometimes feel you are changing your mind just because L'In20Cible answered your post. It's just...
by Ayuto
Mon Jan 13, 2020 7:40 pm
Forum: Plugin Development Support
Topic: Server crash on @EntityPreHook
Replies: 10
Views: 1020

Re: Server crash on @EntityPreHook

Original plugin uses only it, without any conventions: _hWeapon_ShootPosition = DHookCreate(offset, HookType_Entity, ReturnType_Vector, ThisPointer_CBaseEntity); Since it creates a hook using an offset/index in the vtable, it probably assumes THISCALL internally. There is always a convention, becau...
by Ayuto
Fri Jan 03, 2020 7:31 pm
Forum: Plugin Development Support
Topic: [ANY] Prevent user name changes
Replies: 10
Views: 707

Re: [ANY] Prevent user name changes

Sam wrote:"I have the disassemblers and source code on all computers with fast internet xD"
There is a leaked version of the Source Engine 2007, public Source SDK released by Valve and reverse engineered versions of the Source SDK.
by Ayuto
Sat Dec 28, 2019 2:38 pm
Forum: API Design
Topic: My thoughts, questions and wishes
Replies: 25
Views: 1797

Re: My thoughts, questions and wishes

7. Yes, what is wrong with get_interface? Do you have any problems? Can you give me an example? I tried everything but unsuccessfully. Linux. # Tested on Linux with CS:S from core import get_interface ptr = get_interface('bin/engine_srv.so', 'EngineTraceServer003') print(...
by Ayuto
Fri Dec 27, 2019 8:34 pm
Forum: API Design
Topic: My thoughts, questions and wishes
Replies: 25
Views: 1797

Re: My thoughts, questions and wishes

1. I would use Satoon's suggestion. The iterator method is already meant as a method that should be implemented by the programmer if he would like to have its own implementation. 2. Which place do you suggest? 3. Just added a wrapper property to the Player class. With the next release, you can simpl...
by Ayuto
Wed Dec 25, 2019 12:30 pm
Forum: Plugin Development Support
Topic: PlayerDictionary vs CachedPlayer
Replies: 37
Views: 1397

Re: PlayerDictionary vs CachedPlayer

You're wrong! :mad: This code is nicer to read than original version. also the number of lines of code was decreased. From 179 to 107. Your version does not seem to reduce the number of lines by using classes, but by removing comments and blank lines that were added for readability. I thought your ...
by Ayuto
Sat Dec 14, 2019 2:31 pm
Forum: Plugin Development Support
Topic: Repeat timers with cached player instances
Replies: 6
Views: 475

Re: Repeat timers with cached player instances

To be more precise: __del__ is getting called when the refcount reaches 0 and the garbage collector decides to collect it. That can be immediately, in 5 minutes or never.

I will publish a new build tomorrow. Just wrote myself a reminder.
by Ayuto
Mon Dec 09, 2019 9:20 pm
Forum: Development Status Updates
Topic: Development status update (November 2019)
Replies: 0
Views: 1331

Development status update (November 2019)

It's time for another development status update! :smile: ⋅ Fixes: ⋅  Fixed issue #285. ⋅  Fixed issue #287. ⋅  Fixed BaseEntity/BaseEntityOutput being stored as their wrapper rather than their real class name. ⋅ Additions: ⋅  Added BaseEnti...
by Ayuto
Mon Dec 09, 2019 8:58 pm
Forum: Code examples / Cookbook
Topic: [DEV] Algorithm for checking a point in a cube
Replies: 15
Views: 2007

Re: [DEV] Algorithm for checking a point in a cube

I'm not a big fan of reinventing the wheel. Moreover, the built-in method is much faster. import time from mathlib import Vector def PointIsInside(pt, cpt1, cpt2): if ( ((pt[0] >= cpt1[0]) | (pt[0] >= cpt2[0])) & \ ((pt[0] <= cpt2[0]) | (pt[0] ...
by Ayuto
Sun Dec 08, 2019 9:18 pm
Forum: Code examples / Cookbook
Topic: [DEV] Algorithm for checking a point in a cube
Replies: 15
Views: 2007

Re: [DEV] Algorithm for checking a point in a cube

How about point.is_within_box(corner1, corner2)? :P

It should be much faster since it it implemented in C++ (mathlib module). All you need is three Vector instances.
by Ayuto
Thu Nov 28, 2019 10:11 pm
Forum: Development Status Updates
Topic: Development status update (August 2019)
Replies: 9
Views: 2651

Re: Development status update (August 2019)

Just out of curiosity: what features of 3.8 would you like to use?
by Ayuto
Fri Nov 22, 2019 7:24 pm
Forum: Whatever
Topic: [NEW] Sentence
Replies: 4
Views: 756

Re: [NEW] Sentence

I think the problem is that the community is too small. Adding such a forum (and mabye french, german and spanish as well) would split the community into too small pieces. That's why we kept this site english only.
by Ayuto
Tue Oct 15, 2019 4:57 pm
Forum: Plugin Development Support
Topic: Finding a signature for Windows without a string
Replies: 3
Views: 626

Re: Finding a signature for Windows without a string

Actually, that function has two strings: HL2Player.SprintNoPower and HL2Player.SprintStart. However, if you have a function that is really difficult to find, you can try running these scripts: https://github.com/Ayuto/discover_win It first starts with simple string match searches (functions that hav...
by Ayuto
Wed Sep 11, 2019 3:40 pm
Forum: General Discussion
Topic: What is the most reasonable way to install a pypi package to source.python?
Replies: 15
Views: 2519

Re: What is the most reasonable way to install a pypi package to source.python?

You could also try to start your server with -debug. This should generate a debug.log for most games in the game server directory. It should provide some more information.

Go to advanced search