Search found 32 matches
- Wed Mar 21, 2018 8:40 pm
- Forum: Plugin Development Support
- Topic: EntityHook test_function not working?
- Replies: 8
- Views: 6587
Re: EntityHook test_function not working?
I've tried implementing this solution however I am now getting errors thrown when picking up weapons. [SP] Caught an Exception: Traceback (most recent call last): File "..\addons\source-python\plugins\timer\core\zone.py", line 163, in pre_to uch parent.touch.call_trampoline(other) File &qu...
- Wed Mar 21, 2018 5:08 am
- Forum: Plugin Development Support
- Topic: EntityHook test_function not working?
- Replies: 8
- Views: 6587
Re: EntityHook test_function not working?
The reason I wanted to filter the entities like this is because when the hooked event is fired for an entity with a parent, the server freezes. This seems like a major issue with a fundamental part of many plugins. I saw your workaround for this in another thread , but Im hoping there's a simpler wa...
- Wed Mar 21, 2018 1:02 am
- Forum: Plugin Development Support
- Topic: EntityHook test_function not working?
- Replies: 8
- Views: 6587
EntityHook test_function not working?
I'm creating a custom class which extends Entity. When an object is made, it will create EntityPreHook decorators to bind entity events to class functions. I have created a test function which will only return true when the test entity is equal to my entity. Printing the tests, I can see that it is ...
- Thu Mar 15, 2018 7:40 pm
- Forum: Plugin Development Support
- Topic: Player predicted angles
- Replies: 2
- Views: 2787
Re: Player predicted angles
Thank you for the reply. the documentation is a bit unclear about if the angles are the 'predicted' angles or not. It's important for my purposes to be able to set the predicted angles. My plugin will be repeatedly loading this data for a replay feature. Since the viewing client does not get updated...
- Thu Mar 15, 2018 6:19 am
- Forum: Plugin Development Support
- Topic: Player predicted angles
- Replies: 2
- Views: 2787
Player predicted angles
In sourcemod, the OnPlayerRunCmd forward gives access to get/set the player's predicted view angles. I would like to be able to get/set these angles in my sourcepython plugin, but I'm not sure how to do this. Ideally I would like to be able to get/set at directly from the Player reference and not ne...
- Thu Jan 18, 2018 12:43 am
- Forum: Plugin Development Support
- Topic: Supported/Recommended way to set client convars?
- Replies: 1
- Views: 2126
Supported/Recommended way to set client convars?
Is there a supported or recommended way of setting client convars? In Sourcemod there is a function SendConVarValue which will allow you to set the value of a cvar for a specific client, for example sv_airaccelerate or sv_autobunnyhopping. What is the best equivalent solution in source-python? I sea...
- Thu Jan 18, 2018 12:33 am
- Forum: Plugin Development Support
- Topic: Players movementspeed
- Replies: 7
- Views: 6237
Re: Players movementspeed
Would like to add some info. First of all: I talk about CS:GO. There are 2 variables that control speed. If I am correct, the way offered above works with 'sv_accelerate', which is multiplier to your base speed Console variable 'sv_maxspeed' - base speed, which is determined, for example, by weapon...
- Thu Dec 28, 2017 8:55 pm
- Forum: Module/Package Submissions
- Topic: Threaded MySQL
- Replies: 18
- Views: 100909
Re: Threaded MySQL
Your TSQL class is quite a bit overcomplicated if you simply want to execute queries on a different thread with callbacks. This short code snip will let you execute queries on a gamethread without lagging the server. import pymysql as MySQL from listeners.tick import GameThread connection = MySQL.co...
- Sun Dec 17, 2017 12:34 am
- Forum: Plugin Development Support
- Topic: Crash when spawning entities from OnLevelInit
- Replies: 2
- Views: 4272
Crash when spawning entities from OnLevelInit
It seems that trying to spawn entities from the OnLevelInit listener will crash the server. from commands.typed import TypedSayCommand from entities._base import Entity from players._base import Player from listeners import OnLevelInit from mathlib import Vector @TypedSayCommand('add'...
- Thu Nov 23, 2017 3:05 am
- Forum: Plugin Development Support
- Topic: Looping a Timed Task in Many Objects
- Replies: 8
- Views: 7120
Re: Looping a Timed Task in Many Objects
[...] Thanks for your reply. First, yes I am creating multiple instances of the TimerZone class, and also creating child classes of TimerZone to override functions for events such as touch, start_touch, end_touch etc. As well as change beam color per zone class. I am making an invisible zone to ess...
- Wed Nov 22, 2017 8:05 pm
- Forum: Plugin Development Support
- Topic: Looping a Timed Task in Many Objects
- Replies: 8
- Views: 7120
Re: Looping a Timed Task in Many Objects
One option would be Repeat which uses Delay internally, which in turn uses a tick listener. That would be my preferred option in this instance. Thank you for your response. I have tried using both Repeat() and Delay() in my Zone class, but both of these functions cause the server to immediately fre...
- Wed Nov 22, 2017 7:30 am
- Forum: Plugin Development Support
- Topic: Looping a Timed Task in Many Objects
- Replies: 8
- Views: 7120
Looping a Timed Task in Many Objects
I am trying to create a plugin where I have several entities in my map, (Instantiated through my Zone class), and I want these Zones to draw and redraw their outline beams periodically. I don't need the timing to be super precise, I just need it to be reliably recalled repeatedly throughout the life...