Search found 31 matches

by Hymns For Disco
Fri Mar 13, 2020 2:45 am
Forum: General Discussion
Topic: Close network connection to client
Replies: 2
Views: 539

Re: Close network connection to client

If running a linux server, you could try use the iptables command to block the client's address.
This is probably the cleanest way to artificially force a connection drop.
by Hymns For Disco
Thu Mar 12, 2020 6:33 am
Forum: Plugin Development Support
Topic: Perfomance of trace rays
Replies: 3
Views: 739

Re: Perfomance of trace rays

First you have said that you want to trace a circle to find any near player, then you said you are trying to find the "accuracy of the shot". What is the end goal here? If you want to find players that are nearby the shot angle, you can work that without traces (or maybe just a single trac...
by Hymns For Disco
Wed Mar 11, 2020 2:41 pm
Forum: General Discussion
Topic: Any SP fix for CS:GO hint text styling?
Replies: 1
Views: 309

Any SP fix for CS:GO hint text styling?

Some months ago, a CS:GO update broke the capability for styling hint text messages with HTML tags, which allowed styling the messages with font properties such as colors. There is this fix plugin currently used by most servers https://github.com/Franc1sco/FixHintColorMessages I am wondering if ther...
by Hymns For Disco
Wed Mar 11, 2020 1:40 pm
Forum: Plugin Development Support
Topic: Getting Player Reference on Connect and Disconnect (ValueError: Conversion from "Index" to "BaseEntity" failed)
Replies: 5
Views: 1074

Re: Getting Player Reference on Connect and Disconnect (ValueError: Conversion from "Index" to "BaseEntity" failed)

Sorry I had forgotten to check back on this thread. The solution I ended up going with was @listeners.OnLevelShutdown def on_level_shutdown(): disconnect_all_players() OnLevelShutdown allows me to get the player entities of all connected players before they are freed, and run my disc...
by Hymns For Disco
Tue Feb 11, 2020 5:20 am
Forum: Plugin Development Support
Topic: Getting Player Reference on Connect and Disconnect (ValueError: Conversion from "Index" to "BaseEntity" failed)
Replies: 5
Views: 1074

Re: Getting Player Reference on Connect and Disconnect (ValueError: Conversion from "Index" to "BaseEntity" failed)

map dust2 ---- Host_Changelevel ---- [SP] Caught an Exception: Traceback (most recent call last): File "..\addons\source-python\plugins\myplugin\accounts.py", line 111, in on_disconnect player = Player(index) File "..\addons\source-python\packages\source-python\entities\_base.py"...
by Hymns For Disco
Tue Feb 11, 2020 2:24 am
Forum: Plugin Development Support
Topic: Getting Player Reference on Connect and Disconnect (ValueError: Conversion from "Index" to "BaseEntity" failed)
Replies: 5
Views: 1074

Getting Player Reference on Connect and Disconnect (ValueError: Conversion from "Index" to "BaseEntity" failed)

ValueError: Conversion from "Index" (1) to "BaseEntity" failed I get this error when trying to get the player reference for a player on disconnect. @listeners.OnClientDisconnect def on_disconnect(index): player = Player(index) This error seemingly only happens on...
by Hymns For Disco
Wed Jan 22, 2020 7:54 am
Forum: Plugin Development Support
Topic: Difference in float numbers.
Replies: 5
Views: 1055

Re: Difference in float numbers.

My first thought is that gpGlobals->frametime is not guarenteed to be constant. Perhaps it changes to reflect the real time passed on a given tick, and not the ideal exact same time every tick. I haven't combed through the source sdk code to verify. Also note that the wishspeed is derived from the l...
by Hymns For Disco
Tue Jan 21, 2020 3:43 am
Forum: Plugin Development Support
Topic: m_angRotation
Replies: 2
Views: 618

Re: m_angRotation

What is wrong with standard http://wiki.sourcepython.com/developing/modules/entities.entity.html?highlight=rotation#entities.entity.BaseEntity.rotation property? It works properly when entity.set_network_property_vector('m_angRotation', ...) Perhaps you should answer your own question here, what's ...
by Hymns For Disco
Tue Jan 21, 2020 3:28 am
Forum: Plugin Development Support
Topic: Trouble with psycopg2-binary
Replies: 5
Views: 652

Re: Trouble with psycopg2-binary

So here's the trouble: The _psycopg2 C module must be built in order to be loaded by django to access my database. Installing it with my builtin pip3 (3.7 64 bit), will result in it building a _psycopg.cpython-37m-x86_64-linux-gnu.so, which sourcepython will fail to import. If I install psycopg2 fro...
by Hymns For Disco
Tue Jan 21, 2020 12:49 am
Forum: Plugin Development Support
Topic: Trouble with psycopg2-binary
Replies: 5
Views: 652

Re: Trouble with psycopg2-binary

Thank you, that wheel seemed to work. I've updated my install plugins script to act as a "pip for source-python" effectively. #!/bin/bash SOURCEPYTHON="/home/csgoserver/serverfiles/csgo/addons/source-python" echo Installing package requirements to game server pip3 install -q --no...
by Hymns For Disco
Mon Jan 20, 2020 8:04 am
Forum: Plugin Development Support
Topic: Trouble with psycopg2-binary
Replies: 5
Views: 652

Re: Trouble with psycopg2-binary

You need the psycopg2-2.8.4-cp36-cp36m-win32 build. Thank you, I notice this package name contains win32. I'm running my server on Debian 10. Is this correct, does the embedded Python of source-python allow running win32 versions of packages while on a linux os, or will I have to look for something...
by Hymns For Disco
Mon Jan 20, 2020 7:50 am
Forum: Plugin Development Support
Topic: Trouble with psycopg2-binary
Replies: 5
Views: 652

Trouble with psycopg2-binary

I'm trying to use psycopg-binary in my source-python plugin, as its the database driver used by Django for my models. The trouble is that the version of psycopg2 installed in the django project is a 64 bit version, and the embedded python installation of source-python is 32 bit, and so source-python...
by Hymns For Disco
Sun Jan 19, 2020 4:22 am
Forum: General Discussion
Topic: Custom ingame UI elements
Replies: 4
Views: 648

Re: Custom ingame UI elements

I'm wondering if there's a possibility to add a custom menu, or other interactive flat surface element? Would be great to have an HTML-based one, for example. Really depends on the game. Some games have the MOTD window letting the player open an HTML page, but as stated this is removed from CS:GO. ...
by Hymns For Disco
Sun Jan 19, 2020 4:00 am
Forum: General Discussion
Topic: Custom ingame UI elements
Replies: 4
Views: 648

Re: Custom ingame UI elements

L'In20Cible wrote:You can have a look at how iPlayer did for Source.Python.Admin: https://github.com/Source-Python-Dev-Te ... thon.Admin

https://www.youtube.com/watch?v=84HMc5G76ww

MOTD window feature has been removed from CS:GO some time ago in the Panorama UI overhaul
by Hymns For Disco
Mon Dec 24, 2018 9:57 pm
Forum: General Discussion
Topic: PyCharm Project Setup
Replies: 3
Views: 1077

Re: PyCharm Project Setup

You might check out my reply here: https://forums.sourcepython.com/viewtopic.php?f=9&t=1314 I did read this post when I originally set up my project, and read it again this time. That all works to set up the SP modules, but what im more concerned with configuring the interpreter so that install...
by Hymns For Disco
Mon Dec 24, 2018 9:21 am
Forum: General Discussion
Topic: PyCharm Project Setup
Replies: 3
Views: 1077

PyCharm Project Setup

A while ago, I was working on a source-python plugin in PyCharm, and had the project nicely setup to recognise the sp packages, but also, most importantly, under the project interpreter tab, if I installed a site package, it would automatically install it to the source-python site-packages folder al...
by Hymns For Disco
Fri Mar 23, 2018 8:23 pm
Forum: Plugin Development Support
Topic: EntityHook test_function not working?
Replies: 8
Views: 1804

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: 1804

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: 1804

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: 1804

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

Go to advanced search