Search found 200 matches
- Tue Apr 11, 2017 8:19 pm
- Forum: Plugin Development Support
- Topic: How do I use the KeyValues class?
- Replies: 6
- Views: 5515
Re: How do I use the KeyValues class?
That's fast. & Supporting nested dicts out of the box, I like the implementation.
- Tue Apr 11, 2017 6:17 pm
- Forum: Plugin Development Support
- Topic: How do I use the KeyValues class?
- Replies: 6
- Views: 5515
Re: How do I use the KeyValues class?
Thanks! I understand how it works now.
Yes please!
Ayuto wrote:I think it makes sense to add a 'from_dict' method to construct a KeyValues class from a dictionary.
Yes please!
- Tue Apr 11, 2017 4:46 pm
- Forum: Custom Packages
- Topic: MOTDPlayer v2
- Replies: 5
- Views: 46049
Re: MOTDPlayer v2
Does anybody know of a way to sensibly immitate uWSGI on a windows machine? If not looks like I am going to have to work with Ubuntu again :P Well uWSGI can run with Cygwin :3 Or you could try using django-channels instead, but it will require you to rewrite the Flask application into a django proj...
- Tue Apr 11, 2017 11:11 am
- Forum: Plugin Development Support
- Topic: How do I use the KeyValues class?
- Replies: 6
- Views: 5515
How do I use the KeyValues class?
It isn't very clear to me how to best use this class. Let's say I'm trying to write this to a file (I don't care about newlines/whitespace), how would I construct this best using the KeyValues class? (Or is there a better way?) "Admins" { "Admin1" { "auth" "steam&q...
- Tue Apr 04, 2017 3:04 pm
- Forum: Whatever
- Topic: Hello everyone! i didn't know where to post so here i am!
- Replies: 7
- Views: 16937
Re: Hello everyone! i didn't know where to post so here i am!
Don't forget that when python is to slow you can write a C (C++) extension for it easily. You also have Cython . Web applications use caching smartly to great effect. I use Source.Python to connect to a webserver (Django/Daphne) using websockets, which works great: it's very secure (You don't have t...
- Tue Feb 14, 2017 11:59 pm
- Forum: Module/Package Submissions
- Topic: Threaded MySQL
- Replies: 18
- Views: 116418
Re: Threaded MySQL
Actually, this isn't really threaded as Delay and Repeat are used, which are executed in the same thread. So, this will probably just delay the lag. You need to utilize GameThread to create real threads. First of all, it will prevent lag 100%. Delaying every single query is a good solution because ...
- Mon Jan 23, 2017 10:39 pm
- Forum: Plugin Requests
- Topic: Skin Chooser
- Replies: 16
- Views: 14938
Re: Skin Chooser
L'In20Cible wrote:http://blog.counter-strike.net/index.php/server_guidelines/
Guys, read that again, especially the bolded, and now struck through text.
- Mon Jan 23, 2017 10:21 pm
- Forum: Plugin Development Support
- Topic: post json data lag
- Replies: 12
- Views: 9016
Re: post json data lag
No need to handle the tick listener yourself, simply inherit from GameThread . I haven't found __del__ to be very reliable, especially while working with threads. http://stackoverflow.com/a/1481512 I saw bootstrap_inner, but I prefer the finer grained control writing the logic myself gives me while...
- Mon Jan 23, 2017 10:17 pm
- Forum: Plugin Development Support
- Topic: post json data lag
- Replies: 12
- Views: 9016
Re: post json data lag
Be careful, starting a Python thread can introduce lag too. (if someone were to spam !postd, 100% guaranteed the server will start to lag.). My solution would be to create one thread when your plugin starts that you can pass functions to call to, like this: import time import threading import queue...
- Mon Jan 23, 2017 10:12 pm
- Forum: Plugin Releases
- Topic: [CS:GO] AdPurge
- Replies: 3
- Views: 5938
Re: [CS:GO] AdPurge
Neat!
- Fri Oct 07, 2016 6:48 pm
- Forum: General Discussion
- Topic: New CS:GO Update broke plugin(s)?
- Replies: 16
- Views: 14218
Re: New CS:GO Update broke plugin(s)?
I can confirm SP loads without errors on Ubuntu Server 14 LTS with the new CSGO update
sp version:
Current Source.Python version: 346
sp version:
Current Source.Python version: 346
- Thu Sep 29, 2016 6:06 pm
- Forum: General Discussion
- Topic: Using CS:S Model Size in CS:GO
- Replies: 24
- Views: 18382
Re: Using CS:S Model Size in CS:GO
Why don't try and convert the base CSS player models to CSGO? Or edit some CSGO models to be the appropriate size?
- Thu Sep 29, 2016 5:49 pm
- Forum: General Discussion
- Topic: Working of Cache-mem using Queue in Python
- Replies: 1
- Views: 3414
Re: Working of Cache-mem using Queue in Python
You can't test for collection membership on Queues (aka you can't use 'in' on them). >>> 1 in queue.Queue() Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: argument of type 'Queue' is not iterable You could fix that by using deque (...
- Sat Sep 24, 2016 1:43 am
- Forum: General Discussion
- Topic: Builds > Download
- Replies: 2
- Views: 3178
Re: Builds > Download
Top of every forum page > Builds > click your game > profit!? If anything a unified layout would be nice (where you always have the top nav bar, same look, etc), but since a lot of stuff (source/builds) are hosted externally that's virtually impossible and time is better spend on making SP better th...
- Sat Sep 24, 2016 1:31 am
- Forum: Plugin Development Support
- Topic: Connection between multiple servers
- Replies: 3
- Views: 3215
Re: Connection between multiple servers
You could use a database, but that isn't optimal and not what a database is designed for. Peer to peer also isn't optimal, because every server will have to keep a connection open to every other server, which is wasteful. Best thing to do would be to have a centralized server to which all your serve...
- Fri Sep 23, 2016 9:05 pm
- Forum: Plugin Development Support
- Topic: Error when trying to use Player's metaclass with SQLAlchemy's
- Replies: 17
- Views: 13647
Re: Error when trying to use Player's metaclass with SQLAlchemy's
100% a SourcePython Issue. And it's not because you're using metaclasses. from events import Event from players.entity import Player class My1Player(Player): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) class My2Player(Player): def __...
- Mon Sep 12, 2016 9:40 pm
- Forum: Plugin Development Support
- Topic: post json data lag
- Replies: 12
- Views: 9016
Re: post json data lag
Be careful, starting a Python thread can introduce lag too. (if someone were to spam !postd, 100% guaranteed the server will start to lag.). My solution would be to create one thread when your plugin starts that you can pass functions to call to, like this: import time import threading import queue ...
- Fri Sep 09, 2016 7:38 am
- Forum: Plugin Requests
- Topic: Speed + Gravity
- Replies: 3
- Views: 4573
Re: Speed + Gravity
Put in /cstrike/addons/source-python/plugins/{x}/{x}.py where " {x} " is whatever name you want. SPEED_MOD = 1.0 GRAVITY_MOD = 1.0 PERMISSION = "f" SAY_COMMAND = "!sg" CLIENT_COMMAND = "cmd_sg" # Probably should not use sm_ as that signifies SourceMod, which t...
- Thu Sep 08, 2016 6:08 am
- Forum: Plugin Releases
- Topic: Hero Wars (Alpha)
- Replies: 35
- Views: 42437
Re: Hero Wars (Alpha)
That sounds great Mahi & Predz :)
- Mon Sep 05, 2016 10:35 pm
- Forum: Plugin Releases
- Topic: Hero Wars (Alpha)
- Replies: 35
- Views: 42437
Re: Hero Wars (Alpha)
Sad to see this die, site + repo down. Is the source still available somewhere?