Search found 977 matches

by Ayuto
Wed Feb 21, 2018 8:20 pm
Forum: Plugin Development Support
Topic: [CSS]Exception when reading ammo key value
Replies: 4
Views: 100

Re: [CSS]Exception when reading ammo key value

This key value is write-only. Reading is not implemented. You got these weird values/exceptions, because we forgot to initialize an internal variable. That is now fixed with this commit: https://github.com/Source-Python-Dev-Team/Source.Python/commit/3aee743f47727579a0bf2b013d54b4d4ba0aff4c If want t...
by Ayuto
Wed Feb 07, 2018 10:22 pm
Forum: Plugin Development Support
Topic: [CS GO] Make a prop copy an animation
Replies: 7
Views: 204

Re: [CS GO] Make a prop copy an animation

If you plan to change it later anyway, I would rather suggest you to install a local dedicated server. Then you can develop your plugin without any restrictions and don't need to invent a workaround for a temporary problem.
by Ayuto
Wed Feb 07, 2018 4:50 pm
Forum: Plugin Development Support
Topic: [CS GO] Make a prop copy an animation
Replies: 7
Views: 204

Re: [CS GO] Make a prop copy an animation

I don't quite understand the reasoning. What exactly prevents you from creating bots on that special game server?
by Ayuto
Mon Feb 05, 2018 8:03 pm
Forum: Development Status Updates
Topic: Development status update (January 2018)
Replies: 0
Views: 82

Development status update (January 2018)

It's time for another development status update! :smile: ⋅ Fixes: ⋅  Fixed a crash when hooking and modifying a SayText2 message in CS:GO. ⋅  Fixed a typo in __all__ definition. ⋅  Fixed not showing the whole error message if an error occurs during Python init...
by Ayuto
Mon Feb 05, 2018 7:31 pm
Forum: API Design
Topic: Changing returning hooks works + better documentation?
Replies: 5
Views: 178

Re: Changing returning hooks works + better documentation?

Ah that makes sense, what would you do atm if you don't want to modify the return value, only read it in a post hook? Or does setting the return value in the hook immediately update what will be returned to the caller, if so what do different values for the return statement do in a post hook atm? I...
by Ayuto
Mon Feb 05, 2018 6:56 pm
Forum: Plugin Development Support
Topic: [CS GO] Make a prop copy an animation
Replies: 7
Views: 204

Re: [CS GO] Make a prop copy an animation

Are you perhaps looking for something like this?
viewtopic.php?f=20&t=1658&p=11167#p11167

This snippet is for recording/playing player movement/actions, but this could be adapted to create a bot that mimics the player's movement immediately.
by Ayuto
Mon Feb 05, 2018 4:19 pm
Forum: General Discussion
Topic: SourceMod interop
Replies: 5
Views: 274

Re: SourceMod interop

It's up to the user by loading the plugins via autoexec.cfg.
by Ayuto
Sun Feb 04, 2018 8:38 pm
Forum: General Discussion
Topic: SourceMod interop
Replies: 5
Views: 274

Re: SourceMod interop

I see that it is possible to use ``memory`` module to call exported functions on extensions. AddNatives is not an exported function. The memory module uses its private symbol to get its address. The address is then called by the memory module. So, the memory module goes deeper than just calling a p...
by Ayuto
Sun Feb 04, 2018 8:28 pm
Forum: API Design
Topic: Changing returning hooks works + better documentation?
Replies: 5
Views: 178

Re: Changing returning hooks works + better documentation?

Your modifying example is correct, but you can also replace arguments. This is neccessary if the argument is not a pointer. # Assuming we hook: int multiply(int x, int y) def pre_multiply(args): # Replace passed value for x by 5 args[0] = 5 You blocking example is not quite correct. ...
by Ayuto
Fri Feb 02, 2018 5:44 am
Forum: Plugin Development Support
Topic: gg_ffa_bots
Replies: 3
Views: 116

Re: gg_ffa_bots

I'm currently on the phone, but the symbol looks like stack_data[1] is an IGameEvent.
by Ayuto
Thu Feb 01, 2018 6:51 pm
Forum: Plugin Development Support
Topic: Prevent Double Jump
Replies: 10
Views: 991

Re: Prevent Double Jump

CCSGameMovement::OnLand() is quite simple. All it does is calling CCSPlayer::OnLand(). To do that it needs the player instance (CCSPlayer). It's retrieved by accessing this+0x0EA0 (3744). .text:002E7410 ; CCSGameMovement::OnLand(float) .text:002E7410 _ZN15CCSGameMovement6OnLandEf proc near ;...
by Ayuto
Mon Jan 29, 2018 6:46 pm
Forum: Plugin Development Support
Topic: Adding site-packages installed via pip automatically to SP
Replies: 7
Views: 176

Re: Adding site-packages installed via pip automatically to SP

Using pip of a different Python installation doesn't install the package to SP unless you instruct pip to do so by defining the installation location. I can't remember the options you need to pass and I'm currently on the phone, so you need to look up the options on your own or wait a little bit. Mo...
by Ayuto
Sun Jan 28, 2018 1:47 pm
Forum: General Discussion
Topic: SourceMod interop
Replies: 5
Views: 274

Re: SourceMod interop

I just had a look at it and it seems doable. Here is my proof of concept for creating natives. It's using AddNatives to add natives created with SP to the core natives of SM. In a real bridge (not proof of concept) we wouldn't use that function, but create an SM extension instead that exposes a C fu...
by Ayuto
Fri Jan 26, 2018 5:03 pm
Forum: Plugin Development Support
Topic: How to best set spawn points
Replies: 8
Views: 123

Re: PreHook cancel/modify damage

I found these two threads:
viewtopic.php?f=20&t=1426
viewtopic.php?f=10&t=1557

Note that those two entities are not networked in CS:GO. Thus, you need to utilize the BaseEntity class.
by Ayuto
Wed Jan 24, 2018 8:01 pm
Forum: Plugin Development Support
Topic: Creating Sprite does not work consistently
Replies: 4
Views: 160

Re: Creating Sprite does not work consistently

First of all, if you want help with your code, please post the code you have actually used/tested. The code you posted contains syntax errors and name errors. So, this cannot be the code you have tested. Secondly, I took the time to fix the errors and improved your function to find the closest enemy...
by Ayuto
Mon Jan 22, 2018 10:10 pm
Forum: Plugin Development Support
Topic: How to best set spawn points
Replies: 8
Views: 123

Re: PreHook cancel/modify damage

What method do you use to set the location?
by Ayuto
Mon Jan 22, 2018 9:56 pm
Forum: Plugin Development Support
Topic: How to best set spawn points
Replies: 8
Views: 123

Re: PreHook cancel/modify damage

We haven't added a spawn function for CS:S (only for CS:GO. It's called _spawn). But I doubt the origin would already be set. I assume it's set during the spawn call (you can try a post-hook), but I haven't checked that. What exactly are you trying to do?
by Ayuto
Mon Jan 22, 2018 6:52 pm
Forum: Plugin Development Support
Topic: PreHook cancel/modify damage
Replies: 4
Views: 244

Re: PreHook cancel/modify damage

The list of built-in functions/addresses depends on the game and the entity (e.g. players have other functions than other entities). You can use the following snippet to print a list of functions, their arguments and their return types: from entities.entity import Entity from memory import Function ...
by Ayuto
Sun Jan 21, 2018 3:33 pm
Forum: Plugin Development Support
Topic: PreHook cancel/modify damage
Replies: 4
Views: 244

Re: PreHook cancel/modify damage

Yes, a pre-hook is exactly what you need. Here is a small example: from players.entity import Player from entities.hooks import EntityPreHook from entities.hooks import EntityCondition from entities import TakeDamageInfo import memory @EntityPreHook(EntityCondition.is_player, 'on_take_damage...
by Ayuto
Mon Jan 15, 2018 5:55 pm
Forum: Plugin Development Support
Topic: Getting player properties slow?
Replies: 9
Views: 277

Re: Getting player properties slow?

With the latest changes the performance has changed drastically. Running the above code again will result in the following output: 0.15603045563281626 0.2694162790844672 Currently, the bottleneck is retrieving the view angle. If you comment out the lines that retrieve it and run the code again, you ...

Go to advanced search