EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-19)
6 Attachment(s)
As of a 2018 CS:GO update, this include is no longer necessary
Warning: This only works for MP3s Version: 1.0.3 Changelog
What is EmitSoundAny So, what's the point of this? Well, it's to provide a simple include that plugins can use to have CS:GO and DOTA2 compatible sound playing. If you have read the CS:GO Quirks page, you know that CS:GO doesn't work with PrecacheSound and EmitSound without having to go through some tricks. So... I wrote this include, which neatly wraps the game detection and precaches/emits appropriately. The wrappers it includes are: Code:
stock bool:PrecacheSoundAny(const String:szPath[], bool:preload=false) Usage of this is the same as playing sounds in most game using SourceMod: PHP Code:
Edit 2: Edit to make g_bCheckedEngine actually save its value to stop GetEngineVersion from being called every time. |
Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible)
Ok.
Just thinking maybe it no harm add that sound char * for everygame :/ |
Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible)
Quote:
Also you never set g_bCheckedEngine to true ;) |
Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible)
Quote:
|
Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible)
I uploaded version 1.0.2, which includes these fixes:
|
Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Very handy, they should roll it in.
|
Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Quote:
|
Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
I changed a round sounds plugin to use this and now the sound has gone from being normal levels (using the CS:GO Quirks workaround) to being so quiet it can barely be heard. Do you have any idea why this could be?
|
Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Quote:
|
Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
No just the fakeprecache sound method with the * before the filename. I may have foolishly saved over the changed version I made but I'll try to replicate it.
Just to be sure, even though my sounds aren't in the music folder I tried adjusting the music volume which made no difference, and tried to change the SNDLEVEL in the include which also didn't increase it at all. |
All times are GMT -4. The time now is 09:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.