Search found 164 matches

by Doldol
Mon Jul 10, 2017 6:46 pm
Forum: Development Status Updates
Topic: Development status update (June 2017)
Replies: 2
Views: 121

Re: Development status update (June 2017)

Yay, official GMod support!
by Doldol
Thu Apr 27, 2017 7:49 am
Forum: Plugin Development Support
Topic: Is current date between 2 dates
Replies: 9
Views: 352

Re: Is current date between 2 dates

This is what I usually do if I only care about day precision # simple example from datetime import datetime start_date = (2, 20) end_date = (7, 1) now = (datetime.now().month, datetime.now().year) if start_date <= now <= end_date: True # in range else: False #...
by Doldol
Sun Apr 16, 2017 6:07 pm
Forum: Plugin Development Support
Topic: anyway that i can get IpAddress and Port etc in cs:go?
Replies: 6
Views: 318

Re: anyway that i can get IpAddress and Port etc in cs:go?

I honestly don't like the idea of using ConVars, in this instance, because their values are easily changed. But, that does certainly work if you aren't worried about that issue. I feel the same way about querying a remote host for it, it could go down, possibly locking up your plugin, imo even wors...
by Doldol
Sun Apr 16, 2017 3:04 pm
Forum: Plugin Development Support
Topic: anyway that i can get IpAddress and Port etc in cs:go?
Replies: 6
Views: 318

Re: anyway that i can get IpAddress and Port etc in cs:go?

I won't comment on the git issue, since it's about not using hostip, but using that's been the most robust way for me.

Syntax: Select all

ip = ipaddress.IPv4Address(ConVar("hostip").get_int() & 0xffffffff).exploded
host = ConVar("hostport").get_int()
by Doldol
Tue Apr 11, 2017 8:19 pm
Forum: Plugin Development Support
Topic: How do I use the KeyValues class?
Replies: 6
Views: 294

Re: How do I use the KeyValues class?

That's fast. & Supporting nested dicts out of the box, I like the implementation.
by Doldol
Tue Apr 11, 2017 6:17 pm
Forum: Plugin Development Support
Topic: How do I use the KeyValues class?
Replies: 6
Views: 294

Re: How do I use the KeyValues class?

Thanks! I understand how it works now.

Ayuto wrote:I think it makes sense to add a 'from_dict' method to construct a KeyValues class from a dictionary.


Yes please!
by Doldol
Tue Apr 11, 2017 4:46 pm
Forum: Custom Packages
Topic: MOTDPlayer v2
Replies: 4
Views: 357

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...
by Doldol
Tue Apr 11, 2017 11:11 am
Forum: Plugin Development Support
Topic: How do I use the KeyValues class?
Replies: 6
Views: 294

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...
by Doldol
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: 373

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...
by Doldol
Tue Feb 14, 2017 11:59 pm
Forum: Module/Package Submissions
Topic: Threaded MySQL
Replies: 15
Views: 1168

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 ...
by Doldol
Mon Jan 23, 2017 10:39 pm
Forum: Plugin Requests
Topic: Skin Chooser
Replies: 16
Views: 1094

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.
by Doldol
Mon Jan 23, 2017 10:21 pm
Forum: Plugin Development Support
Topic: post json data lag
Replies: 12
Views: 826

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...
by Doldol
Mon Jan 23, 2017 10:17 pm
Forum: Plugin Development Support
Topic: post json data lag
Replies: 12
Views: 826

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...
by Doldol
Mon Jan 23, 2017 10:12 pm
Forum: Plugin Releases
Topic: [CS:GO] AdPurge
Replies: 3
Views: 508

Re: [CS:GO] AdPurge

Neat!
by Doldol
Fri Oct 07, 2016 6:48 pm
Forum: General Discussion
Topic: New CS:GO Update broke plugin(s)?
Replies: 16
Views: 1370

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
by Doldol
Thu Sep 29, 2016 6:06 pm
Forum: General Discussion
Topic: Using CS:S Model Size in CS:GO
Replies: 24
Views: 1687

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?
by Doldol
Thu Sep 29, 2016 5:49 pm
Forum: General Discussion
Topic: Working of Cache-mem using Queue in Python
Replies: 1
Views: 386

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 (...
by Doldol
Sat Sep 24, 2016 1:43 am
Forum: General Discussion
Topic: Builds > Download
Replies: 2
Views: 397

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...
by Doldol
Sat Sep 24, 2016 1:31 am
Forum: Plugin Development Support
Topic: Connection between multiple servers
Replies: 3
Views: 319

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...
by Doldol
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: 1111

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

Go to advanced search