Raised This Month: $140 Target: $400
 35% 

[CSGO-Req] weapon sounds changer


Post New Thread Reply   
 
Thread Tools Display Modes
Bara
AlliedModders Donor
Join Date: Apr 2012
Location: Germany
Old 08-12-2018 , 16:35   Re: [CSGO-Req] weapon sounds changer
Reply With Quote #11

But it just works for player who doesn't have this weapon/knife in the hand. Used this code as example/test:
Code:
#include <sourcemod>
#include <sdktools>

#pragma newdecls required

public void OnPluginStart()
{
    AddNormalSoundHook(SoundHook);
}

public Action SoundHook(int clients[64], int &numClients, char sound[PLATFORM_MAX_PATH], int &entity, int &channel, float &volume, int &level, int &pitch, int &flags)
{
    PrintToChatAll(sound);
    return Plugin_Stop;
}
__________________
Bara is offline
rogeraabbccdd
Veteran Member
Join Date: Jun 2015
Location: de_dust2
Old 08-13-2018 , 08:17   Re: [CSGO-Req] weapon sounds changer
Reply With Quote #12

Hook weapon_fire?
__________________

Please comment on my profile, or I will ignore your friend request.

GitHub | Steam | WARMOD+ | Discord:Kento#2118
rogeraabbccdd is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Location: Not your business.
Old 08-13-2018 , 08:19   Re: [CSGO-Req] weapon sounds changer
Reply With Quote #13

Quote:
Originally Posted by rogeraabbccdd View Post
Hook weapon_fire?
Great idea. Take notes ya'll.
__________________
Taking requests, add me on Steam.

mug1wara.xyz

Never call me a weeb.
mug1wara is offline
sHoC
Senior Member
Join Date: Nov 2015
Old 08-13-2018 , 11:18   Re: [CSGO-Req] weapon sounds changer
Reply With Quote #14

Quote:
Originally Posted by rogeraabbccdd View Post
Hook weapon_fire?
Can you share a script with hook weapon_fire
Thank you in advice.
__________________
sHoC is offline
LenHard
Senior Member
Join Date: Jan 2016
Old 08-13-2018 , 22:28   Re: [CSGO-Req] weapon sounds changer
Reply With Quote #15

Quote:
Originally Posted by sHoC View Post
Can you share a script with hook weapon_fire
Thank you in advice.
r/woooosh

You can't alter weapon fire sound with the hook weapon_fire...
__________________


Currently accepting private requests.
LenHard is offline
Ilusion9
Member
Join Date: Jun 2018
Old 08-14-2018 , 10:31   Re: [CSGO-Req] weapon sounds changer
Reply With Quote #16

Quote:
Originally Posted by mug1wara View Post
Great idea. Take notes ya'll.
have you tested that to be a great idea?

you can emit sounds in weapon_fire, but you cannot block them.
you can block them in AddNormalSoundHook, but who knows if will work fine.
Ilusion9 is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Location: Not your business.
Old 08-14-2018 , 14:36   Re: [CSGO-Req] weapon sounds changer
Reply With Quote #17

Quote:
Originally Posted by Ilusion9 View Post
have you tested that to be a great idea?

you can emit sounds in weapon_fire, but you cannot block them.
you can block them in AddNormalSoundHook, but who knows if will work fine.
I was sarcastic...
__________________
Taking requests, add me on Steam.

mug1wara.xyz

Never call me a weeb.
mug1wara is offline
brunoronning
Member
Join Date: Jan 2014
Location: Brazil
Old 08-14-2018 , 20:16   Re: [CSGO-Req] weapon sounds changer
Reply With Quote #18

Must be working:

Spoiler


BUT it is not possible to block the original sound for who are shooting due to the client's predict (that is, you will hear both sounds), just for the other players.

Last edited by brunoronning; 08-14-2018 at 20:18.
brunoronning is offline
sHoC
Senior Member
Join Date: Nov 2015
Old 08-16-2018 , 15:49   Re: [CSGO-Req] weapon sounds changer
Reply With Quote #19

Quote:
Originally Posted by brunoronning View Post
Must be working:

Spoiler


BUT it is not possible to block the original sound for who are shooting due to the client's predict (that is, you will hear both sounds), just for the other players.
what I have to edit in the source code? to add the sound for awp?
__________________
sHoC is offline
Reply


Thread Tools
Display Modes

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 18:07.


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