Search found 1737 matches

by satoon101
Tue Feb 16, 2021 7:53 pm
Forum: Plugin Development Support
Topic: Wrong args/parameters for emit_sound
Replies: 1
Views: 105

Re: Wrong args/parameters for emit_sound

The second argument, if you aren't giving keywords for them, in Player.play_sound is volume, not duration: https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/addons/source-python/packages/source-python/players/_base.py#L715-L721 My guess is that video.duration is a string value, and...
by satoon101
Fri Feb 12, 2021 7:31 pm
Forum: Plugin Development Support
Topic: [Cs:s] Ban Counter
Replies: 3
Views: 172

Re: [Cs:s] Ban Counter

If you don't absolutely need weeks to be a factor, I would suggest not reinventing the wheel and just use datetime.timedelta, which is also demonstrated in the link Ayuto provided. Or, at the very least, you could convert the weeks first and then use timedelta on the remaining seconds.
by satoon101
Sun Jan 31, 2021 5:08 pm
Forum: Plugin Development Support
Topic: [CS:S/CSGO] How to get list of primaries and secondaries and use able in menu?
Replies: 7
Views: 840

Re: [CS:S/CSGO] How to get list of primaries and secondaries and use able in menu?

If you want to iterate over specific types of weapons (ie primary or secondary), you could also use WeaponClassIter.
by satoon101
Thu Jan 28, 2021 5:11 pm
Forum: Plugin Requests
Topic: [REQUEST]Hide Radar
Replies: 16
Views: 1596

Re: Hide Radar (toggleable)

For future reference, if you are wanting help creating your own plugin and not having someone create it for you, feel free to use the Plugin Development Support forum. As for your question, hiding the radar is different in CS:S compared to CS:GO. Here is how it is done in GunGame for each: https://g...
by satoon101
Sun Jan 24, 2021 7:32 pm
Forum: Plugin Requests
Topic: [CS:GO] Color flashlight with adjustable radius
Replies: 9
Views: 508

Re: [CS:GO] Color flashlight with adjustable radius

⋅ Yes. Here is a good thread about skyboxes in CS:GO: https://forums.sourcepython.com/viewtopic.php?f=37&t=2427 ⋅ I believe so. The above link discusses options for fog. I don't think it's as easy to do in CS:GO as it was in HL2:DM or CS:S ⋅ I believe so. Again, so...
by satoon101
Thu Jan 14, 2021 10:16 pm
Forum: Plugin Releases
Topic: Grenades noblock
Replies: 3
Views: 520

Re: Grenades noblock

The entity argument given to OnEntityCreated hooks is a BaseEntity object, which already has access to the set_property_uchar method. Also, we store the game's projectiles in the weapon_manager , so you could use that instead of writing each of the weapons down in the plugin. So, with those changes,...
by satoon101
Tue Jan 12, 2021 8:17 pm
Forum: Plugin Development Support
Topic: [CS:S] Blocking item pickup notification
Replies: 8
Views: 798

Re: [CS:S] Blocking item pickup notification

I'm not 100% sure this will work properly, but maybe try stopping the pickup event from broadcasting to players:

Syntax: Select all

from events.hooks import EventAction, PreEvent

@PreEvent('item_pickup')
def _pre_pickup(game_event):
return EventAction.STOP_BROADCAST
by satoon101
Thu Dec 31, 2020 4:34 pm
Forum: Plugin Development Support
Topic: [HL2DM] Menus not showing plain text
Replies: 4
Views: 495

Re: [HL2DM] Menus not showing plain text

Unless I'm mistaken, you don't want a menu, you want a Dialog message. Specifically, DialogText.
by satoon101
Mon Dec 28, 2020 3:11 pm
Forum: Plugin Requests
Topic: [Cs:s] Automatic mapcycle.txt creator
Replies: 3
Views: 352

Re: [Cs:s] Automatic mapcycle.txt creator

I have a few tips when it comes to using the 'path' package included with SP. ⋅ Using the __div__ method to automatically add directory using proper os.sep: MAP_PATH = GAME_PATH / 'maps' ⋅ Open a file with the .open method along with the 'with' statement (which automatica...
by satoon101
Tue Dec 22, 2020 11:52 pm
Forum: Plugin Releases
Topic: Quakesounds
Replies: 21
Views: 3650

Re: Quakesounds

That's just a warning, so nothing to be concerned about. The plugin can be updated to use path.Path instead of path.path to fix that warning. In future versions of the path package, they did remove path.path. I'm not sure if/when we'll update the SP version of that package, but if/when we do, it wil...
by satoon101
Fri Dec 18, 2020 8:23 pm
Forum: Plugin Requests
Topic: [HL2:DM] Deathmsg Help
Replies: 42
Views: 24946

Re: [HL2:DM] Deathmsg Help

It might be easier to use a dictionary to store the display names for each weapon than an expanding list of elif statements.
by satoon101
Wed Dec 09, 2020 3:41 am
Forum: Plugin Requests
Topic: HL2DM - Grenade trails
Replies: 4
Views: 925

Re: HL2DM - Grenade trails

This plugin does the trail, and it should work for HL2DM, but not necessarily with the changing color feature: https://forums.sourcepython.com/viewtopic.php?f=7&t=1806 Do you mean the same trail mid arch changes color or just player 1 throws a nade and it has 1 trail color, then later throws ano...
by satoon101
Fri Oct 30, 2020 1:14 pm
Forum: Plugin Requests
Topic: [Cs:s] chat command to change map
Replies: 13
Views: 1401

Re: [Cs:s] chat command to change map

I'm not sure what your issue might be, but it worked fine for me. I used "!map de_dust" in chat and it told me it was changing the map in 3 seconds, and then it changed maps to de_dust.
by satoon101
Fri Oct 30, 2020 3:40 am
Forum: Plugin Requests
Topic: [Cs:s] chat command to change map
Replies: 13
Views: 1401

Re: [Cs:s] chat command to change map

Sorry for the double post, but I also noticed that you imported listdir. Since SP ships with the path package and all of the paths in our 'paths' package are path.Path instances, listing files in a directory are actually even easier. For instance, you can use the path.Path.files method to not only l...
by satoon101
Thu Oct 29, 2020 10:03 pm
Forum: Plugin Requests
Topic: [Cs:s] chat command to change map
Replies: 13
Views: 1401

Re: [Cs:s] chat command to change map

I'm not sure you want the possible_maps logic. For instance, if you want to switch to de_dust, it will always give you that "Be more specific" message, because there's de_dust and de_dust2.
by satoon101
Thu Oct 29, 2020 3:55 pm
Forum: Plugin Requests
Topic: HL2DM color text
Replies: 7
Views: 990

Re: HL2DM color text

Don't call the plugin 'colors'. There's a package called 'colors' inside SP itself, which is what is imported and causing that error.
by satoon101
Thu Oct 29, 2020 3:01 pm
Forum: Plugin Requests
Topic: HL2DM color text
Replies: 7
Views: 990

Re: HL2DM color text

This might not be exactly what you're looking for, but it's at least a good start: from random import choice import colors from cvars import ConVar from listeners.tick import Delay from messages import SayText from messages.hooks import HookUserMessage from players.entity import Player CHAT_STRINGS ...
by satoon101
Tue Oct 13, 2020 3:44 pm
Forum: Plugin Requests
Topic: [HL2:DM] 3 Teams
Replies: 36
Views: 10261

Re: [HL2:DM] 3 Teams

What do you mean by "it will not compile"?
by satoon101
Sat Sep 05, 2020 6:12 pm
Forum: Plugin Development Support
Topic: Information for hooks
Replies: 6
Views: 1056

Re: Information for hooks

Ok. If I have time tonight, I will run some tests to figure out what you want to use.
by satoon101
Sat Sep 05, 2020 5:53 pm
Forum: Plugin Development Support
Topic: Information for hooks
Replies: 6
Views: 1056

Re: Information for hooks

I just reread your original post, and I noticed you said you can get an Entity instance using infected_hurt. If you print out the classname of that entity, you can then use that classname in your EntityPreHook. @EntityPreHook(EntityCondition.equals_entity_classname('<classname>')...

Go to advanced search