Search found 1624 matches

by satoon101
Tue May 22, 2018 4:13 am
Forum: Plugin Development Support
Topic: Preventing death event take_damage
Replies: 4
Views: 79

Re: Preventing death event take_damage

It's not an "event" pre-hook, it's pre-hooking a function in memory. Events just notify you that some is happening (or primarily 'has' happened). You can hook events, but the effect of doing that is very limited. Here is how you could hook the OnTakeDamage function and get the attacker's i...
by satoon101
Tue May 22, 2018 2:45 am
Forum: Plugin Development Support
Topic: Preventing death event take_damage
Replies: 4
Views: 79

Re: Preventing death event take_damage

You can get the attacker's information from the TakeDamageInfo. http://wiki.sourcepython.com/developing/modules/entities.html?highlight=takedamageinfo#entities.TakeDamageInfo.attacker You can also get the weapon used in the attack. http://wiki.sourcepython.com/developing/modules/entities.html?highli...
by satoon101
Sun May 20, 2018 12:54 am
Forum: Plugin Development Support
Topic: SP's update changes
Replies: 8
Views: 111

Re: SP's update changes

Yes. https://github.com/Source-Python-Dev-Team/Source.Python/pull/235 Prior to that pull request, that functionality was primary handled by Python. We moved most of the CBaseEntity properties to C++ for performance reasons. Due to those changes, angles now must explicitly use QAngle and not Vector.
by satoon101
Sat May 19, 2018 10:09 pm
Forum: Plugin Development Support
Topic: SP's update changes
Replies: 8
Views: 111

Re: SP's update changes

We do give monthly updates:

viewforum.php?f=40

Each update also includes a link that shows all commits made during that month.
by satoon101
Thu May 17, 2018 6:21 pm
Forum: Plugin Development Support
Topic: How to block money award?
Replies: 6
Views: 110

Re: How to block money award?

Ha! Nice one Valve/HPE...

To remove the message, you can use a HookUserMessage on SayText2. I am not sure what that specific message is, but you can always print it out or search through the resource file that stores these translations.
by satoon101
Wed May 16, 2018 9:00 pm
Forum: Plugin Development Support
Topic: Accessing properties of parent in subclass
Replies: 3
Views: 88

Re: Accessing properties of parent in subclass

You'll want to call the super() init method, otherwise certain things won't happen on initialization of the instance: class rpgPlayer(Player): def __init__(self, index): super().__init__(index) # Other stuff *Edit: also, you're missing the "self" argument in...
by satoon101
Wed May 16, 2018 8:36 pm
Forum: Plugin Development Support
Topic: Accessing properties of parent in subclass
Replies: 3
Views: 88

Re: Accessing properties of parent in subclass

It works fine for me in GunGame. We'd have to see some of your code to see why this might not be happening in your case.
by satoon101
Sun May 13, 2018 4:15 pm
Forum: Plugin Releases
Topic: ProjectileTrails v1.0.0
Replies: 0
Views: 91

ProjectileTrails v1.0.0

ProjectileTrails adds trails to projectiles (ie thrown grenades). The configuration is based on the known projectiles for the specific game. For instance, in CS:S and CS:GO, both will have settings for hegrenade, flashbang, and smokegrenade, while CS:GO will also contain settings for decoy, molotov ...
by satoon101
Tue May 08, 2018 8:47 pm
Forum: General Discussion
Topic: SP for Day of Infamy
Replies: 2
Views: 77

Re: SP for Day of Infamy

I think this quote from Ayuto on Synergy sums up this one as well:
Ayuto wrote:It certainly could be supported if there is enough demand.


And I'll add to both of those requests that if anyone wants to take on either of those tasks themselves and create a pull request, we certainly encourage that.
by satoon101
Tue May 08, 2018 8:42 pm
Forum: Plugin Development Support
Topic: Disabling game specific sounds
Replies: 13
Views: 728

Re: Disabling game specific sounds

I have personally never dealt with any of that stuff before. Though, if I'm thinking right, you might be able to modify the existing weapon scripts to accomplish this. I have no experience with that, either, but others on here might be able to help clarify.
by satoon101
Tue May 08, 2018 8:40 pm
Forum: Plugin Development Support
Topic: how to catch the halftime
Replies: 5
Views: 150

Re: how to catch the halftime

Definitely check out what decompile said. That should really be all you need. As for handling warmup in the other code, you should be able to use the round_end event to check whether the match is starting. I don't know all the reasons for round_end in CS:GO. I think we used to have a listing of them...
by satoon101
Wed May 02, 2018 10:49 pm
Forum: Plugin Development Support
Topic: how to get the current game state/match state
Replies: 3
Views: 130

Re: how to get the current game state/match state

I have not tested any of this, but I did see m_gamePhase and thought it might be helpful. A quick google search led me to this: https://github.com/splewis/get5/blob/master/scripting/get5/util.sp#L19-L25 I did print out that value locally with no players (including bots) on the server, and it returne...
by satoon101
Tue May 01, 2018 11:06 pm
Forum: Plugin Development Support
Topic: Tempent Troubles
Replies: 7
Views: 127

Re: Tempent Troubles

No, I figured out the issue. You need to also pass the following values: ⋅ color ⋅ A colors.Color instance or even pass in red, green, blue, alpha instead ⋅ model ⋅ An engines.precache.Model instance ⋅ start_width ⋅ end_width We might consi...
by satoon101
Tue May 01, 2018 10:31 pm
Forum: Plugin Development Support
Topic: Tempent Troubles
Replies: 7
Views: 127

Re: Tempent Troubles

2 things come to mind. First, a player's 'origin' is at their feet, so you will need to look down to see it. Also, the distance from a player's origin (feet) to their eye location is 64 game units (in CS:S, at least). So, 10 units as the radius is very small.
by satoon101
Tue May 01, 2018 1:13 pm
Forum: Plugin Development Support
Topic: How to organize code
Replies: 2
Views: 99

Re: How to organize code

You don't have to use import_module. Even if you don't need to import anything from that module, you can still just import it normally: import .core.menus.triggers Though, I don't really know all of your packages/modules and the functionality of each, so it would be hard to say how I would personall...
by satoon101
Sun Apr 29, 2018 6:26 pm
Forum: Plugin Development Support
Topic: Disabling game specific sounds
Replies: 13
Views: 728

Re: Disabling game specific sounds

'Body Drop Sounds', 'Headshot Sound', 'Death Sound', 'Weapon Shoot Sounds', 'Step sounds' Cheers! For the headshot sound, I found that if you change the hitgroup in an OnTakeDamage hook, it should still do the same amount of damage, but remove the headshot sound and whiplash. If you still want the ...
by satoon101
Sun Apr 29, 2018 12:23 am
Forum: Plugin Development Support
Topic: menu build callback being called over and over
Replies: 2
Views: 112

Re: menu build callback being called over and over

The menu is not only sent when you call main_menu.send, but also every second after that. The reason for this is because menus automatically drop from players' screens in some games after 4 seconds. To combat that, we send the menu every second. During send, we rebuild the menu, which will call your...
by satoon101
Sat Apr 28, 2018 3:06 pm
Forum: General Discussion
Topic: Interested in Source.Python, got some questions
Replies: 2
Views: 121

Re: Interested in Source.Python, got some questions

Welcome to the forums! Run times in SP are similar to SM, but could be slightly slower in some cases. SP allows you to do anything that ES did, including SPE functionality, and then some. As VinciT mentioned, you also have access to the thousands of Python packages available on PyPi, if you happen t...
by satoon101
Sat Apr 28, 2018 2:46 pm
Forum: Plugin Development Support
Topic: create json file dump the value
Replies: 1
Views: 69

Re: create json file dump the value

When you open a file in 'write' mode, you are overwriting the entire file. If you want to 'append' to the file, open it in 'append' mode: op = open('file.json', 'a') Also, for future reference, when posting Python code on the forums, use [ python][/python] instead of [ code][...

Go to advanced search