Search found 1776 matches

by satoon101
Fri Feb 12, 2021 7:31 pm
Forum: Plugin Development Support
Topic: [Cs:s] Ban Counter
Replies: 3
Views: 2724

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: 4746

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: 21
Views: 13787

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: 10
Views: 10987

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: 3866

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: 4580

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: 2937

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: 2819

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: 28
Views: 30024

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: 47
Views: 46689

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: 3772

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: 7445

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: 7445

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: 7445

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: 4674

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: 4674

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: 22813

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: 3876

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: 3876

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>')...
by satoon101
Sat Sep 05, 2020 5:36 pm
Forum: Plugin Development Support
Topic: Information for hooks
Replies: 6
Views: 3876

Re: Information for hooks

Here is a list of all events for L4D2: http://wiki.sourcepython.com/developing/events/l4d2.html The infected_death might work better in this instance: http://wiki.sourcepython.com/developing/events/l4d2.html#infected-death Also, you might try to find what entity type infected are by using the dumpen...

Go to advanced search