Search found 241 matches
- Tue Dec 07, 2021 9:16 am
- Forum: Plugin Releases
- Topic: RPG:SP v2
- Replies: 0
- Views: 10371
RPG:SP v2
Renamed from RPG:GO to RPG:SP in v2 RPG:SP by Mahi Repository: https://github.com/Mahi/RPG-SP Download and installation : https://github.com/Mahi/RPG-SP/releases/tag/v2.0.0 Main changes from v1: - Use SQLAlchemy for database management, so works easily with any SQL database (MySQL, PostgreSQL, SQLi...
- Mon Dec 06, 2021 1:17 pm
- Forum: Module/Package Submissions
- Topic: Newer SQLAlchemy version
- Replies: 2
- Views: 38744
Re: Newer SQLAlchemy version
Nice to hear that it's nice to see me! :-) Been lurking here every now and then though, just busy with real life.
Anyways, that's a lot of updating... Good luck, bye!
Anyways, that's a lot of updating... Good luck, bye!
- Thu Dec 02, 2021 12:50 pm
- Forum: Module/Package Submissions
- Topic: Newer SQLAlchemy version
- Replies: 2
- Views: 38744
Newer SQLAlchemy version
Source.Python currently ships with SQLAlchemy 1.0.14, whereas the latest stable release of SQLAlchemy is 1.4.27.
While possible to update manually, it would be nicer if the shipped version was already up-to-date :-)
While possible to update manually, it would be nicer if the shipped version was already up-to-date :-)
- Sat May 06, 2017 8:54 am
- Forum: Custom Packages
- Topic: [Any] Idle Manager
- Replies: 5
- Views: 28228
Re: [Any] Idle Manager
Looks really nice, good job! One thing that catches my eye is the naming conventions. Function names should be snake_case instead of CamelCase , according to the PEP8 at least. So you should probably make these changes: ⋅ ResetIdleTimer => reset_idle_timer ⋅ SetIdle => set_idle...
- Wed Apr 12, 2017 9:35 am
- Forum: General Discussion
- Topic: Python 3.6 support?
- Replies: 13
- Views: 12063
Re: Python 3.6 support?
Glad to hear it's under the radar! Not to hurry, but can't wait!
- Tue Apr 11, 2017 12:49 pm
- Forum: General Discussion
- Topic: Python 3.6 support?
- Replies: 13
- Views: 12063
Python 3.6 support?
Are there any plans or ETA to add Python 3.6 support? There are a few huge things in it, namely faster dicts, f-strings, and __init_subclass__(), last of which I'd love to get my hands on already. I believe the f-strings make it worthy upgrade for almost any SP plugin though.
- Fri Mar 24, 2017 4:27 pm
- Forum: Whatever
- Topic: Hello everyone! i didn't know where to post so here i am!
- Replies: 7
- Views: 16921
Re: Hello everyone! i didn't know where to post so here i am!
Sorry for the late. Well, about the python is slow i worked a lot with web frameworks and it was really slow i think it was about 2000 request per seconds... Python is on the slower end surely, but I believe even the worst frameworks do better than that. Flask can do 10000 requests per second and a...
- Fri Feb 24, 2017 5:54 pm
- Forum: Plugin Development Support
- Topic: Error when trying to use Player's metaclass with SQLAlchemy's
- Replies: 17
- Views: 13629
Re: Error when trying to use Player's metaclass with SQLAlchemy's
Bumping the thread due to starting to work on this again :D We started working on a fix for this this morning, but we realized that any fix for this would mask the same error happening when someone forgets to call super().__init__ in their inheriting class. That is certainly not something we would w...
- Tue Feb 21, 2017 3:59 pm
- Forum: Plugin Development Support
- Topic: Apply skin cause csgo game crash
- Replies: 16
- Views: 17823
Re: Apply skin cause csgo game crash
Is this the whole code? Since this should not work. You're mixing the events from my Wacraft mod with Source.Python's default events. You should try something like this: from players.entity import Player _model = Model('models/props/cs_militia/toilet.mdl') @Event('player_spaw...
- Fri Oct 14, 2016 9:42 am
- Forum: Plugin Releases
- Topic: [ANY] Infinite Jumping (aka AutoBHop)
- Replies: 6
- Views: 9912
Re: Infinite Jumping (aka AutoBHop)
CS:GO just got a new update which implements this http://blog.counter-strike.net/index.php/2016/10/16312/ — sv_enablebunnyhopping (default 0): Disables the air-velocity clamping to 110% of maximum running speed. — sv_autobunnyhopping (default 0): Holding +jump causes players to automatically re-jump...
- Wed Oct 05, 2016 10:46 am
- Forum: Plugin Development Support
- Topic: Is it possible to check if a function has been decorated with a listener?
- Replies: 1
- Views: 2894
Is it possible to check if a function has been decorated with a listener?
For example, is it possible to know from my_listener that it has been decorated here: @OnLevelChange def my_listener(...): pass I'm using a class decorator and I need to loop through all of the class's methods, and if they have been decorated with a listener, I need to wrap them. Basically t...
- Sat Oct 01, 2016 3:39 pm
- Forum: Plugin Development Support
- Topic: Error when trying to use Player's metaclass with SQLAlchemy's
- Replies: 17
- Views: 13629
Re: Error when trying to use Player's metaclass with SQLAlchemy's
Thanks, I'll take a look at the workaround tomorrow! :) We started working on a fix for this this morning, but we realized that any fix for this would mask the same error happening when someone forgets to call super().__init__ in their inheriting class. That is certainly not something we would want ...
- Fri Sep 30, 2016 5:49 pm
- Forum: Plugin Development Support
- Topic: Error when trying to use Player's metaclass with SQLAlchemy's
- Replies: 17
- Views: 13629
Re: Error when trying to use Player's metaclass with SQLAlchemy's
I've done some further testing, and this is 99% the issue. The following code works fine and creates a database of all jumping players with boolean value of 1 to the _player column: from sqlalchemy import create_engine, Boolean, Column, Integer from sqlalchemy.orm import sessionmaker from sqlalchemy...
- Thu Sep 29, 2016 2:02 pm
- Forum: Whatever
- Topic: Split screen support! Probably just spectating, but maybe...
- Replies: 5
- Views: 7571
Re: Split screen support! Probably just spectating, but maybe...
I'll update if I got time later on today! :) Also, lol at this guy: https://www.reddit.com/r/GlobalOffensive/comments/551au0/split_screen_multiplayer_or_official_split_screen/d86vrsv Edit: Nvm he deleted it, it said something like "First I wondered why would your plugin break from this -- then ...
- Thu Sep 29, 2016 10:18 am
- Forum: Whatever
- Topic: Split screen support! Probably just spectating, but maybe...
- Replies: 5
- Views: 7571
Split screen support! Probably just spectating, but maybe...
Apparently player events got a new splitscreenplayer argument: https://www.reddit.com/r/GlobalOffensive/comments/551au0/split_screen_multiplayer_or_official_split_screen/ If this ends up being a multiplayer split screen, we could have some new ideas for new mods! Some kind of duo puzzle which "...
- Tue Sep 27, 2016 3:59 pm
- Forum: Plugin Development Support
- Topic: Why does this missing import NOT raise an error?
- Replies: 2
- Views: 3544
Re: Why does this missing import NOT raise an error?
Ohhh, that's exactly it! I didn't know that it's enough for one file to import it like that if it's all in the same package. TIL, thanks :)
Edit: Just to be sure, I recommend nobody to start doing this just because it works.
Edit: Just to be sure, I recommend nobody to start doing this just because it works.
- Tue Sep 27, 2016 2:38 pm
- Forum: Plugin Development Support
- Topic: Why does this missing import NOT raise an error?
- Replies: 2
- Views: 3544
Why does this missing import NOT raise an error?
It seems like I've forgotten an import, but for one reason or another the code runs just fine and no errors are raised: https://github.com/Mahi/Warcraft-SP/blo ... ft.py#L186
I never import warcraft.listeners...
I never import warcraft.listeners...
- Sun Sep 25, 2016 10:23 pm
- Forum: Plugin Development Support
- Topic: Error when trying to use Player's metaclass with SQLAlchemy's
- Replies: 17
- Views: 13629
Re: Error when trying to use Player's metaclass with SQLAlchemy's
So this is an SP problem for sure? Should I put up an issue on GitHubAyuto wrote:The problems are caused by the implementation of Entity.__getattr__ and Entity.__setattr__. If you use BaseEntity instead of Player, it seems to work fine.
- Sun Sep 25, 2016 7:09 pm
- Forum: Plugin Development Support
- Topic: Need help to decide which cooldown method is best
- Replies: 10
- Views: 9473
Re: Need help to decide which cooldown method is best
When you are talking about readability: yes. Indeed, and that means a lot since I value readability and easiness very high! I want these skills to be readable and copy/paste-able by beginners too so they can make their own skills with very little knowledge of Python. And a hundred subclasses is sli...
- Sun Sep 25, 2016 6:08 pm
- Forum: Plugin Development Support
- Topic: Need help to decide which cooldown method is best
- Replies: 10
- Views: 9473
Re: Need help to decide which cooldown method is best
Would you rather override __init__() in a hundred subclasses and define separate cooldown manually for every method which happens to need them, or would you have self.cooldowns = defaultdict(Cooldown) in the base class and then never have to worry about initializing your cooldowns in...