AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved [Help] Reload sound (https://forums.alliedmods.net/showthread.php?t=319554)

Manu127 11-07-2019 12:30

[Help] Reload sound
 
Hi. Is there a way to block or replace the reload sound of a weapon?

georgik57 11-07-2019 15:31

Re: [Help] Reload sound
 
Hook FM_EmitSound pre.
Search for all the wav sounds containing "load/clip" in your cstrike/czero folder.
Make a string list with all those sounds in your plug-in.
Inside your EmitSound hook, check with equali.
If the sound matches one of the strings, return FMRES_SUPERCEDE.

OciXCrom 11-07-2019 16:26

Re: [Help] Reload sound
 
Quote:

Originally Posted by georgik57 (Post 2672266)
Hook FM_EmitSound pre.
Search for all the wav sounds containing "load/clip" in your cstrike/czero folder.
Make a string list with all those sounds in your plug-in.
Inside your EmitSound hook, check with equali.
If the sound matches one of the strings, return FMRES_SUPERCEDE.

Weapon sounds are clientside and can't be blocked using that method.

Manu127 11-07-2019 17:06

Re: [Help] Reload sound
 
Exactly. I can't hook those sounds via EmitSound. I'm trying to make a player absolute invisible, and for this I'm using pev_groupinfo so players cant see each other. The problem is that I can still hear the reload sound and see the bullets that the weapon drops when its fired.

Manu127 11-09-2019 00:00

Re: [Help] Reload sound
 
I found the solution to both of my problems:

PHP Code:

set_msg_blockget_user_msgid"Brass" ), BLOCK_SET );
set_msg_blockget_user_msgid"ReloadSound" ), BLOCK_SET ); 



All times are GMT -4. The time now is 11:10.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.