Search found 15 matches

by Hymns For Disco
Fri Mar 23, 2018 8:23 pm
Forum: Plugin Development Support
Topic: EntityHook test_function not working?
Replies: 8
Views: 568

Re: EntityHook test_function not working?

Thank you for helping with this problem. I think I now have a better understanding of how these hooks work. So turns out I was just being dumb before thinking that pothooks were safe, same issue. I've implemented the fix like you said and it seems to work fine, however there are still crashes if the...
by Hymns For Disco
Wed Mar 21, 2018 10:28 pm
Forum: Plugin Development Support
Topic: EntityHook test_function not working?
Replies: 8
Views: 568

Re: EntityHook test_function not working?

Well I've realised finally that I can use EntityPostHook instead of EntityPreHook and it seems to avoid this whole server freezing situation, which is great since post hooks will work fine in my circumstances. However I, and I'm sure other people too, would like to know how to safely use EntityPreHo...
by Hymns For Disco
Wed Mar 21, 2018 9:40 pm
Forum: Plugin Development Support
Topic: EntityHook test_function not working?
Replies: 8
Views: 568

Re: EntityHook test_function not working?

The second problem im having is that I can't find the entity property names for the start_touch and end_touch functions (if they exist). For touch you use m_pfnTouch, but I can't seem to find any other properties like this for touch function. If these properties dont exist, is there any alternate me...
by Hymns For Disco
Wed Mar 21, 2018 8:40 pm
Forum: Plugin Development Support
Topic: EntityHook test_function not working?
Replies: 8
Views: 568

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...
by Hymns For Disco
Wed Mar 21, 2018 5:08 am
Forum: Plugin Development Support
Topic: EntityHook test_function not working?
Replies: 8
Views: 568

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...
by Hymns For Disco
Wed Mar 21, 2018 1:02 am
Forum: Plugin Development Support
Topic: EntityHook test_function not working?
Replies: 8
Views: 568

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 ...
by Hymns For Disco
Thu Mar 15, 2018 7:40 pm
Forum: Plugin Development Support
Topic: Player predicted angles
Replies: 2
Views: 434

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...
by Hymns For Disco
Thu Mar 15, 2018 6:19 am
Forum: Plugin Development Support
Topic: Player predicted angles
Replies: 2
Views: 434

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...
by Hymns For Disco
Thu Jan 18, 2018 12:43 am
Forum: Plugin Development Support
Topic: Supported/Recommended way to set client convars?
Replies: 1
Views: 287

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...
by Hymns For Disco
Thu Jan 18, 2018 12:33 am
Forum: Plugin Development Support
Topic: Players movementspeed
Replies: 7
Views: 904

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...
by Hymns For Disco
Thu Dec 28, 2017 8:55 pm
Forum: Module/Package Submissions
Topic: Threaded MySQL
Replies: 18
Views: 5946

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...
by Hymns For Disco
Sun Dec 17, 2017 12:34 am
Forum: Plugin Development Support
Topic: Crash when spawning entities from OnLevelInit
Replies: 2
Views: 560

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'...
by Hymns For Disco
Thu Nov 23, 2017 3:05 am
Forum: Plugin Development Support
Topic: Looping a Timed Task in Many Objects
Replies: 8
Views: 1202

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...
by Hymns For Disco
Wed Nov 22, 2017 8:05 pm
Forum: Plugin Development Support
Topic: Looping a Timed Task in Many Objects
Replies: 8
Views: 1202

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...
by Hymns For Disco
Wed Nov 22, 2017 7:30 am
Forum: Plugin Development Support
Topic: Looping a Timed Task in Many Objects
Replies: 8
Views: 1202

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...

Go to advanced search