Search found 241 matches
- Wed Dec 31, 2014 11:52 am
- Forum: Plugin Development Support
- Topic: Creating events of variable name without using the decorator?
- Replies: 6
- Views: 4954
Creating events of variable name without using the decorator?
I have a block of code that needs to be executed upon each event firing, and each event being handled exactly the same except for one string, the event's name. Simple example: from events import Event @Event def player_spawn(game_event): f('player_spawn', my_global, game_event.ge...
- Sat Dec 13, 2014 12:43 pm
- Forum: Plugin Development Support
- Topic: Developing a plugin for SP, need some personal support.
- Replies: 3
- Views: 3321
Developing a plugin for SP, need some personal support.
Hey there fellas :) I've been developing a Warcraft-like plugin for Source.Python, but due to lack of time and SP documentations, it has gotten really slow for me to develop it any further. Finding simple stuff takes a long time and I have little to no experience with the newest version of SP. I con...
- Sun Mar 24, 2013 9:42 am
- Forum: Whatever
- Topic: Learning python
- Replies: 8
- Views: 10142
There's no reason to go with Notepad++, the IDLE text editor that comes with the official python is more than enough for creating python scripts. If you need more control over your coding (you don't...), use emacs or vi. However, they require some time to learn and the benefits in python are minuscu...
- Wed Feb 27, 2013 1:25 am
- Forum: General Discussion
- Topic: What happened to my addon?
- Replies: 4
- Views: 5306
- Tue Feb 26, 2013 9:09 am
- Forum: General Discussion
- Topic: What happened to my addon?
- Replies: 4
- Views: 5306
- Tue Feb 26, 2013 12:40 am
- Forum: General Discussion
- Topic: What happened to my addon?
- Replies: 4
- Views: 5306
What happened to my addon?
Hello people of Source Python! I haven't visited this site for a looong time, and today the site just popped into my mind! I was happy to see it's still up, but there was this one thing I didn't understand - where is my addon? I spent many working days on that addon (rpg addon, to be accurate) and n...
- Tue Dec 18, 2012 1:25 pm
- Forum: API Design
- Topic: Binutils.FindVirtualFunction()
- Replies: 8
- Views: 9977
Since I'm somewhat more advanced C++ programmer (been doing it for ~4 years, not a professional yet tho) and my father is one of the world's finest programmers so I can ask him for help at anything, I would love to help a little with this project. Problem is, I've got barely any knowledge of source ...
- Thu Dec 06, 2012 12:46 pm
- Forum: General Discussion
- Topic: MySQL
- Replies: 4
- Views: 4961
- Tue Nov 27, 2012 5:32 pm
- Forum: News & Announcements
- Topic: Messaging system changes
- Replies: 19
- Views: 17924
I think that messages should also be included to the PlayerEntity so you could just do <player>.sendMessage(...), but then again if that's needed, it's not too hard to implement myself. May I ask the reasons behind this change? It would be good to hear some reasons behind most of the major decisions...
- Mon Sep 03, 2012 8:49 pm
- Forum: Plugin Development Support
- Topic: EasyPlayer creates new instance on every call?
- Replies: 5
- Views: 5951
This would've been enough, problem is that I'm on a phone so I couldn't test it myself. But thanksAyuto wrote:As you can see here EasyPlayer is a simple object. So everytime you want to get an instance, a new instance will be created.
- Mon Sep 03, 2012 7:53 pm
- Forum: Plugin Development Support
- Topic: EasyPlayer creates new instance on every call?
- Replies: 5
- Views: 5951
- Mon Sep 03, 2012 6:59 pm
- Forum: Plugin Development Support
- Topic: EasyPlayer creates new instance on every call?
- Replies: 5
- Views: 5951
EasyPlayer creates new instance on every call?
I can't download the newest build yet, so I can't test this out for couple of days. However, I was just wondering, if I get EasyPlayer from userid, and then later on check if an other EasyPlayer instance from the same userid is equal to the first EasyPlayer, will it be? Or would I have to compare li...
- Sun Sep 02, 2012 3:06 pm
- Forum: API Design
- Topic: Information lib with constants in it
- Replies: 7
- Views: 8781
Indeed, would make things a lot easier. Then again, you can write it in a simple .py file by yourself too. Also, there seems to be a small discussion about team's already, you should check the page 2 atleast.
- Sun Sep 02, 2012 2:22 pm
- Forum: Plugin Development Support
- Topic: Importing script from addons\source-python\<script> folder
- Replies: 2
- Views: 3874
Well, you say you are loading "test", but the code block says "Test". Which one is it, so that we can help further? Just as a note, "test" is a built-in module in Python3, so you will be unable to use a script at ../addons/source-python/test/test.py . We "could" eventually remove this module, but t...
- Sun Sep 02, 2012 2:01 pm
- Forum: Plugin Development Support
- Topic: Importing script from addons\source-python\<script> folder
- Replies: 2
- Views: 3874
Importing script from addons\source-python\<script> folder
I've been working on this problem for a while now, and decided to come ask you guys. What I got now, are two files as following: ..\addons\source-python\test\test.py ..\addons\source-python\test\classes.py Now if I want to import classes.py file into my test.py file, this is what I'd do: from classe...
- Sun Sep 02, 2012 9:56 am
- Forum: Plugin Development Support
- Topic: Retreiving 'CBasePlayer.m_iFOV' ?
- Replies: 21
- Views: 19572
i dont see the difference of using "EasyPlayer or EdictofPlayer" ? There isn't any if you're only calling SetPropInt. However, EasyPlayer holds in alot more than that. EasyPlayer can use all (or atleast most?) the same functions as EdictOfPlayer, and it has alot more, fe. it can get player's name, ...
- Fri Aug 31, 2012 4:19 am
- Forum: Plugin Development Support
- Topic: Retreiving 'CBasePlayer.m_iFOV' ?
- Replies: 21
- Views: 19572
- Thu Aug 30, 2012 8:58 pm
- Forum: Plugin Development Support
- Topic: Retreiving 'CBasePlayer.m_iFOV' ?
- Replies: 21
- Views: 19572
- Thu Aug 30, 2012 8:20 pm
- Forum: API Design
- Topic: Extended event variables - for player objects and indeces
- Replies: 11
- Views: 12647
Good to notice that people actually highlight ideas, and unlike most plugin developers, you guys actually consider suggestions... And GetIndexOfUserid would do the trick more than well enough, returning all 3, player, userid AND index would be just waste of cpu imo, since you would rarely need all 3...
- Thu Aug 30, 2012 8:13 pm
- Forum: Plugin Development Support
- Topic: Basic script help
- Replies: 22
- Views: 19913
Not sure who to quote, but case understood. And of course 3 lines ain't much, it's just that if we need to use them often, and the first 2 lines really rarely, it might start feeling useless coding. Well it's not useless, but I think you got the point. But it's just an other suggestion, you're the o...