Raised This Month: $ Target: $400
 0% 

USP Weapon, replace shots-sound.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Wentix
Junior Member
Join Date: Jan 2009
Old 02-26-2009 , 09:52   USP Weapon, replace shots-sound.
Reply With Quote #1

Hello,
How can I replace USP-shots to shots like a silence-mode.
I tried cs_set_weapon_silen(), but this not what I need.

Anyone can help?)
sorry for bad english :)
Wentix is offline
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 02-26-2009 , 10:07   Re: USP Weapon, replace shots-sound.
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?t=45461
Empowers is offline
Send a message via ICQ to Empowers
Wentix
Junior Member
Join Date: Jan 2009
Old 02-27-2009 , 02:39   Re: USP Weapon, replace shots-sound.
Reply With Quote #3

Thanks.

I try this:
Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

new g_soundlist[64] = "items/flashlight1.wav";

public plugin_init()
{
	register_forward(FM_EmitSound, "block_sound");
}

public block_sound(entity, channel, const sound[])
{
	if(equali(sound, g_soundlist)){
			return FMRES_SUPERCEDE;
	}
	return FMRES_IGNORED;
}
It works.

But when I replace flashlight.wav to weapons/usp_unsil-1.wav, its not working...
Maybe cs use another sound-file?

Last edited by Wentix; 02-27-2009 at 02:46.
Wentix is offline
Wentix
Junior Member
Join Date: Jan 2009
Old 02-27-2009 , 23:22   Re: USP Weapon, replace shots-sound.
Reply With Quote #4

so..
anyone can help?
Wentix is offline
iNspiratioN
Member
Join Date: Feb 2009
Location: Lithuania
Old 02-28-2009 , 05:39   Re: USP Weapon, replace shots-sound.
Reply With Quote #5

use "weapons/usp1.wav" for silence shot.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

new g_soundlist[2][64] =
{
    
"weapons/usp1.wav",
    
"weapons/usp2.wav"
}

public 
plugin_init() {
    
register_forward(FM_EmitSound"block_sound")
}

public 
block_sound(entitychannel, const sound[]) {

    new 
g_listsize sizeof g_soundlist
    
for(new ii<g_listsizei++)
    {
        if( 
equali(soundg_soundlist[i]) )
            return 
FMRES_SUPERCEDE
    
}
    return 
FMRES_IGNORED

I guess like this...
Attached Files
File Type: amxx usp_sound.amxx (1.6 KB, 201 views)
File Type: sma Get Plugin or Get Source (usp_sound.sma - 741 views - 482 Bytes)

Last edited by iNspiratioN; 02-28-2009 at 05:52.
iNspiratioN is offline
Wentix
Junior Member
Join Date: Jan 2009
Old 02-28-2009 , 07:01   Re: USP Weapon, replace shots-sound.
Reply With Quote #6

iNspiratioN, your code is not working (
Wentix is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:08.


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