Search found 1426 matches

by Ayuto
Tue Jun 09, 2015 6:24 am
Forum: Plugin Development Support
Topic: ConVar - equivalent to RegisterConVarChanges
Replies: 9
Views: 13630

We haven't added that to the wiki yet. But here is the source code: https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/addons/source-python/packages/source-python/memory/__init__.py#L77

I can add that to the wiki today. :)
by Ayuto
Mon Jun 08, 2015 5:34 pm
Forum: Plugin Development Support
Topic: ConVar - equivalent to RegisterConVarChanges
Replies: 9
Views: 13630

I would like to take this chance to show another feature of SP, which is already available since a long time. Though, we have improved this feature a few weeks ago. You can create functions, which have an address in memory, so you can pass them to any function you want. This means that you can creat...
by Ayuto
Fri Jun 05, 2015 7:14 pm
Forum: General Discussion
Topic: Python's eval() function
Replies: 9
Views: 12557

Well, it does not allow you to use operators.

Check the docs: https://docs.python.org/3.4/library/ast.html#ast.literal_eval
by Ayuto
Fri Jun 05, 2015 4:29 am
Forum: Plugin Releases
Topic: Admin Commands
Replies: 9
Views: 33925

Could you please post the error?
by Ayuto
Thu Jun 04, 2015 12:54 pm
Forum: General Discussion
Topic: Few questions regarding S.P and SourceMod
Replies: 18
Views: 25463

Yes, you could do that, but what's the point? You can easily decompile it back to a *.py file. Moreover, we want to encourage people to make their code public.
by Ayuto
Thu Jun 04, 2015 9:57 am
Forum: Plugin Development Support
Topic: Angle of Incidence
Replies: 14
Views: 20910

plane.normal returns a Vector object.

Sorry for the short answers. I'm currently in my phone.
by Ayuto
Thu Jun 04, 2015 7:45 am
Forum: Plugin Development Support
Topic: Angle of Incidence
Replies: 14
Views: 20910

I guess you currently only have two points. The player's location and the impact location (which is on the wall). But I think you need another point on the wall, because you can't calculate the angle to a single point. :D
by Ayuto
Wed Jun 03, 2015 7:41 am
Forum: Plugin Development Support
Topic: CSGO: Change nick
Replies: 3
Views: 5893

Yes, it's possible, but requires the memory module. I guess we will add that functionality at some point, so you can just do player.name = <new name>: import memory from memory import Convention from memory import DataType from memory.hooks import PreHook from engines.server import engine_server fro...
by Ayuto
Fri May 29, 2015 7:45 pm
Forum: Plugin Development Support
Topic: how to show name of player that you are pointing to
Replies: 22
Views: 38101

I just read about properties and found a quote of the zen of python, which is obviously a point for you.
There should be one-- and preferably only one --obvious way to do it.
And since we are actually following many proposals, we should think about following that as well.
by Ayuto
Fri May 29, 2015 6:26 pm
Forum: Plugin Development Support
Topic: how to show name of player that you are pointing to
Replies: 22
Views: 38101

We decided that we want to have properties, because we think they are more handy. Do you have any sources for the "usually" in your edit? I have never seen a proposal for that. Though, I should also mention that I didn't search for it. If you are looking for other projects, which are using get_*/set...
by Ayuto
Fri May 29, 2015 9:50 am
Forum: Plugin Development Support
Topic: how to show name of player that you are pointing to
Replies: 22
Views: 38101

The error tells you which types you can pass to the constructor. However, you don't need the pointer thing. Just return trace.get_entity_index().
by Ayuto
Thu May 28, 2015 7:52 pm
Forum: Plugin Development Support
Topic: How to reset the player's sound to normal on player_blind?
Replies: 55
Views: 97150

No, L'In20Cible is right. Here is the proof. https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/src/core/modules/memory/memory_hooks.cpp#L124

If you would just return True or False in a PreHook, what would be the return value for the caller?
by Ayuto
Wed May 27, 2015 7:49 pm
Forum: Plugin Development Support
Topic: point_hurt: cs go
Replies: 28
Views: 54094

Oh, you right. I just checked the code. Well, in that case it would be quite easy to get rid of this problem. We could also update our take_damage() method so that it takes an additional keyword. E.g. try_trampoline=True. Our take_damage() method would then look like this. def take_damage( self,...
by Ayuto
Wed May 27, 2015 7:06 pm
Forum: Plugin Development Support
Topic: point_hurt: cs go
Replies: 28
Views: 54094

To call the original function within a hook, we have added a call_trampoline() method. Though, that will probably not help in this particular case, because we are hooking OnTakeDamage, but calling TakeDamage. : /
by Ayuto
Wed May 27, 2015 3:32 pm
Forum: Plugin Development Support
Topic: Get Attackerweapon from TakeDamageInfo
Replies: 21
Views: 63677

Yeah, but they are not included in the latest release.
satoon101 wrote:Those 2 classes are not included in the latest release.
by Ayuto
Wed May 27, 2015 3:11 pm
Forum: Plugin Development Support
Topic: Get Attackerweapon from TakeDamageInfo
Replies: 21
Views: 63677

If you are getting the ImportError, you probably didn't update your Python files.
by Ayuto
Tue May 26, 2015 7:23 pm
Forum: Plugin Development Support
Topic: Changing player speed
Replies: 3
Views: 5465

Actually it's working fine for me. On which game did you test that and did you update your SP files? from players.entity import PlayerEntity from players.helpers import index_from_userid from events import Event @Event def player_jump(event): userid = event.get_int('userid') ...
by Ayuto
Tue May 26, 2015 5:40 am
Forum: Plugin Development Support
Topic: Class attributes as Dictionary keys and values
Replies: 4
Views: 6439

That's not the full traceback. However, you have to call super().__init__().

Go to advanced search