Search found 1776 matches
- Fri Feb 12, 2021 7:31 pm
- Forum: Plugin Development Support
- Topic: [Cs:s] Ban Counter
- Replies: 3
- Views: 2843
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.
- 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: 4917
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.
- Thu Jan 28, 2021 5:11 pm
- Forum: Plugin Requests
- Topic: [REQUEST]Hide Radar
- Replies: 21
- Views: 14922
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...
- Sun Jan 24, 2021 7:32 pm
- Forum: Plugin Requests
- Topic: [CS:GO] Color flashlight with adjustable radius
- Replies: 10
- Views: 16407
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...
- Thu Jan 14, 2021 10:16 pm
- Forum: Plugin Releases
- Topic: Grenades noblock
- Replies: 3
- Views: 4171
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,...
- Tue Jan 12, 2021 8:17 pm
- Forum: Plugin Development Support
- Topic: [CS:S] Blocking item pickup notification
- Replies: 8
- Views: 4745
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
- Thu Dec 31, 2020 4:34 pm
- Forum: Plugin Development Support
- Topic: [HL2DM] Menus not showing plain text
- Replies: 4
- Views: 3033
Re: [HL2DM] Menus not showing plain text
Unless I'm mistaken, you don't want a menu, you want a Dialog message. Specifically, DialogText.
- Mon Dec 28, 2020 3:11 pm
- Forum: Plugin Requests
- Topic: [Cs:s] Automatic mapcycle.txt creator
- Replies: 3
- Views: 3003
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...
- Tue Dec 22, 2020 11:52 pm
- Forum: Plugin Releases
- Topic: Quakesounds
- Replies: 28
- Views: 39996
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...
- Fri Dec 18, 2020 8:23 pm
- Forum: Plugin Requests
- Topic: [HL2:DM] Deathmsg Help
- Replies: 47
- Views: 49056
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.
- Wed Dec 09, 2020 3:41 am
- Forum: Plugin Requests
- Topic: HL2DM - Grenade trails
- Replies: 4
- Views: 3993
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...
- Fri Oct 30, 2020 1:14 pm
- Forum: Plugin Requests
- Topic: [Cs:s] chat command to change map
- Replies: 13
- Views: 7883
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.
- Fri Oct 30, 2020 3:40 am
- Forum: Plugin Requests
- Topic: [Cs:s] chat command to change map
- Replies: 13
- Views: 7883
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...
- Thu Oct 29, 2020 10:03 pm
- Forum: Plugin Requests
- Topic: [Cs:s] chat command to change map
- Replies: 13
- Views: 7883
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.
- Thu Oct 29, 2020 3:55 pm
- Forum: Plugin Requests
- Topic: HL2DM color text
- Replies: 7
- Views: 4945
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.
- Thu Oct 29, 2020 3:01 pm
- Forum: Plugin Requests
- Topic: HL2DM color text
- Replies: 7
- Views: 4945
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 ...
- Tue Oct 13, 2020 3:44 pm
- Forum: Plugin Requests
- Topic: [HL2:DM] 3 Teams
- Replies: 36
- Views: 24389
Re: [HL2:DM] 3 Teams
What do you mean by "it will not compile"?
- Sat Sep 05, 2020 6:12 pm
- Forum: Plugin Development Support
- Topic: Information for hooks
- Replies: 6
- Views: 4029
Re: Information for hooks
Ok. If I have time tonight, I will run some tests to figure out what you want to use.
- Sat Sep 05, 2020 5:53 pm
- Forum: Plugin Development Support
- Topic: Information for hooks
- Replies: 6
- Views: 4029
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>')...
- Sat Sep 05, 2020 5:36 pm
- Forum: Plugin Development Support
- Topic: Information for hooks
- Replies: 6
- Views: 4029
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...