Search found 57 matches
- Sun Jul 12, 2015 4:33 am
- Forum: Plugin Development Support
- Topic: [TF2] *_from_index functions are screwed up...
- Replies: 20
- Views: 15032
If you are encountering an error prior to your print statement, the print statement will never be called. Since you use int(command[1]), and command[1] is not an value that can be typecast to integer, you will get a ValueError. If you put your print statement prior to the erroring line, it will pri...
- Sun Jul 12, 2015 12:39 am
- Forum: Plugin Development Support
- Topic: [TF2] *_from_index functions are screwed up...
- Replies: 20
- Views: 15032
- Sun Jul 12, 2015 12:22 am
- Forum: Plugin Development Support
- Topic: [TF2] *_from_index functions are screwed up...
- Replies: 20
- Views: 15032
That thread you were looking at was probably very old. The wiki should typically be up to date. Threads on the forum are never updated for API changes. still having issue with command[1]... The wiki says command[1] will give me the 1st argument while command[0] is the command name itself. Everytime...
- Sat Jul 11, 2015 9:52 pm
- Forum: Plugin Development Support
- Topic: [TF2] *_from_index functions are screwed up...
- Replies: 20
- Views: 15032
SayCommand, SayFilter, ClientCommand, and ClientCommandFilter all have the player's PlayerInfo instance as the first argument in the callback, not their index: http://wiki.sourcepython.com/pages/commands.client http://wiki.sourcepython.com/pages/commands.say I got the code from an example snippet o...
- Sat Jul 11, 2015 9:12 pm
- Forum: Plugin Development Support
- Topic: [TF2] *_from_index functions are screwed up...
- Replies: 20
- Views: 15032
- Sat Jul 11, 2015 9:06 pm
- Forum: Plugin Development Support
- Topic: [TF2] *_from_index functions are screwed up...
- Replies: 20
- Views: 15032
- Sat Jul 11, 2015 7:35 pm
- Forum: Plugin Development Support
- Topic: [TF2] *_from_index functions are screwed up...
- Replies: 20
- Views: 15032
[TF2] *_from_index functions are screwed up...
everytime I use a "*_from_index" function on players, it keeps throwing me this error... incorrect CPP sigs... boost.python.argerror: Python argument types in _players._helpers.playerinfo_from_index(PlayerInfo) did not match CPP signature: playerinfo_from_index(int, bool raise_exception=True) http:/...
- Fri Jul 10, 2015 9:03 pm
- Forum: Code examples / Cookbook
- Topic: [TF2] getting healing target + checking if player is being healed from a dispenser
- Replies: 20
- Views: 39122
- Mon Jul 06, 2015 12:49 am
- Forum: Plugin Development Support
- Topic: New Project: Porting Saxton Hale mod for Source.Python
- Replies: 27
- Views: 23031
- Sun Jul 05, 2015 10:06 pm
- Forum: Plugin Development Support
- Topic: New Project: Porting Saxton Hale mod for Source.Python
- Replies: 27
- Views: 23031
a small question with Python... How would I carry over data from one Event function to another without using a global variable? Example: I set the player's iLives field to '1' and I need to carry it to the player_death event so I can interpret the lives logic. How can I do this example without using...
- Sat Jul 04, 2015 1:52 am
- Forum: Code examples / Cookbook
- Topic: [TF2] getting healing target + checking if player is being healed from a dispenser
- Replies: 20
- Views: 39122
- Fri Jul 03, 2015 12:58 am
- Forum: Code examples / Cookbook
- Topic: [TF2] getting healing target + checking if player is being healed from a dispenser
- Replies: 20
- Views: 39122
If you have Source.Python specific imports, you need a Source.Python environment for it to compile in, afaik. And even that won't catch all errors. It is highly recommended that to post in this section you should not only make sure the plugin loads, but functions properly. To do that, you need to r...
- Thu Jul 02, 2015 9:26 pm
- Forum: Code examples / Cookbook
- Topic: [TF2] getting healing target + checking if player is being healed from a dispenser
- Replies: 20
- Views: 39122
I'm happy that you play around with SP, but you should really test your code before posting on the forums -- at least when it comes to code examples! There are some errors in your code. I apologize, I'm used to compiling my code as I did with sourcemod but I don't know how to test-compile with sour...
- Thu Jul 02, 2015 12:20 pm
- Forum: Code examples / Cookbook
- Topic: [TF2] getting healing target + checking if player is being healed from a dispenser
- Replies: 20
- Views: 39122
I'm happy that you play around with SP, but you should really test your code before posting on the forums -- at least when it comes to code examples! There are some errors in your code. I apologize, I'm used to compiling my code as I did with sourcemod but I don't know how to test-compile with sour...
- Wed Jul 01, 2015 11:42 pm
- Forum: Plugin Development Support
- Topic: New Project: Porting Saxton Hale mod for Source.Python
- Replies: 27
- Views: 23031
You're still passing a second variable on __init__ which will cause an error. In Python, __new__ gets called prior to __init__. Our __new__ class method for Entity/PlayerEntity requires exactly 1 argument, the entity's/player's index. This is where the error would be encountered when you pass too m...
- Wed Jul 01, 2015 4:02 pm
- Forum: Code examples / Cookbook
- Topic: [TF2] getting healing target + checking if player is being healed from a dispenser
- Replies: 20
- Views: 39122
[TF2] getting healing target + checking if player is being healed from a dispenser
Two code examples for those wishing to go into TF2 :smile: 'get_healing_target' SHOULD return the heal-player of the player's medigun Then there's 'is_near_dispenser' which checks to see how much stuff is healing the player and sorting it out whether it's from medics or not. Thus, it works very nice...
- Wed Jul 01, 2015 12:08 am
- Forum: Plugin Development Support
- Topic: New Project: Porting Saxton Hale mod for Source.Python
- Replies: 27
- Views: 23031
- Tue Jun 30, 2015 7:04 pm
- Forum: Plugin Development Support
- Topic: New Project: Porting Saxton Hale mod for Source.Python
- Replies: 27
- Views: 23031
- Tue Jun 30, 2015 1:45 pm
- Forum: Plugin Development Support
- Topic: New Project: Porting Saxton Hale mod for Source.Python
- Replies: 27
- Views: 23031
New Project: Porting Saxton Hale mod for Source.Python
So everybody, I've decided that, for my first real plugin here, I'd port the popular saxton hale mod from SourcePawn to Python using real object-orientation! so far, making a nice class for the bosses. I'm debating if I should encapsulate the class members or just leave them public as this will be m...
- Mon Jun 29, 2015 6:15 am
- Forum: Plugin Releases
- Topic: simple death and kill streaks tracker
- Replies: 16
- Views: 13557
You also might want to set the deathstreaks regardless of whether victim id equals attacker id or not, otherwise suicides wouldn't count as deaths. in the cases of suicide, the killer is the player I believe. reason why range of 0-65 is because the Source Engine supports 64 players + a SourceTV or ...