Raised This Month: $ Target: $400
 0% 

How to change a sounds of weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
totopizza
AlliedModders Donor
Join Date: Oct 2015
Location: Honduras
Old 10-13-2015 , 22:58   How to change a sounds of weapons
Reply With Quote #1

Hi, my name Oscar.

I do not know how to change the sounds of weapons, when:
Shoot, Reload, and when the player CHOOSE, and sought some tutorials on this forum, but I find none, I'd like some guide me how to do this plugin, I have knowledge in pawn, but still not as changing the sound of a weapon.

* Note: I am from Honduras, I'm using google translator, sorry if I do not understand well.

Thanks for your time.
totopizza is offline
Msalinas2877
Member
Join Date: Oct 2015
Location: Chile
Old 10-13-2015 , 23:03   Re: How to change a sounds of weapons
Reply With Quote #2

[ESP]Hablas español?

You Speak Spanish?
__________________
Msalinas2877 is offline
totopizza
AlliedModders Donor
Join Date: Oct 2015
Location: Honduras
Old 10-13-2015 , 23:07   Re: How to change a sounds of weapons
Reply With Quote #3

Español:
Sí, mi idioma es el español.

English:

Yes, my language is the spanish
totopizza is offline
Msalinas2877
Member
Join Date: Oct 2015
Location: Chile
Old 10-13-2015 , 23:13   Re: How to change a sounds of weapons
Reply With Quote #4

[ESP]Bueno yo hablo tambien español asi que no tengo problemas, he encontrado esto en otro post, talvez te sirva

Well i speak spanish too so i dont have problems, i found this in another post, maybe it help you

Code:
#include <amxmodx>
#include <fakemeta>

#define MAX_KNIFE_SNDS 9

public plugin_init()
{
register_plugin("Custom knife sounds" , "0.1" , "v3x");
register_forward(FM_EmitSound , "EmitSound");
}

// Original knife sounds
new knife_sounds_o[MAX_KNIFE_SNDS][] =
{
"weapons/knife_deploy1.wav",
"weapons/knife_hit1.wav",
"weapons/knife_hit2.wav",
"weapons/knife_hit3.wav",
"weapons/knife_hit4.wav",
"weapons/knife_hitwall1.wav",
"weapons/knife_slash1.wav",
"weapons/knife_slash2.wav",
"weapons/knife_stab.wav"
}

// Replacement knife sounds ( edit these!! )
new knife_sounds_r[MAX_KNIFE_SNDS][] =
{
"GHW/weapons/knife_deploy1.wav",
"GHW/weapons/knife_hit1.wav",
"GHW/weapons/knife_hit2.wav",
"GHW/weapons/knife_hit3.wav",
"GHW/weapons/knife_hit4.wav",
"GHW/weapons/knife_hitwall1.wav",
"GHW/weapons/knife_slash1.wav",
"GHW/weapons/knife_slash2.wav",
"GHW/weapons/knife_stab.wav"
}

public plugin_precache()
{
for(new i = 0; i < MAX_KNIFE_SNDS; i++)
precache_sound(knife_sounds_r[i]);
}

public EmitSound(entity, channel, const sound[])
{
if(pev_valid(entity) && is_user_alive(entity))
{
for(new i = 0; i < MAX_KNIFE_SNDS; i++)
{
if(equal(sound , knife_sounds_o[i]))
{
emit_sound(entity, channel, knife_sounds_r[i], 1.0, ATTN_NORM, 0, PITCH_NORM);
return FMRES_SUPERCEDE;
}
}
}
return FMRES_IGNORED;
}
__________________

Last edited by Msalinas2877; 10-13-2015 at 23:37. Reason: Correct code
Msalinas2877 is offline
totopizza
AlliedModders Donor
Join Date: Oct 2015
Location: Honduras
Old 10-13-2015 , 23:20   Re: How to change a sounds of weapons
Reply With Quote #5

Muchas gracias,

Si me podrías explicar la función, de como funciona, ya que nunca e usado el "sdktools"


Thank you,

If I could explain the function, how it works, and since I never used the "sdktools"
totopizza is offline
Msalinas2877
Member
Join Date: Oct 2015
Location: Chile
Old 10-13-2015 , 23:28   Re: How to change a sounds of weapons
Reply With Quote #6

Lol i post a source mod code i am gonna edit it
__________________
Msalinas2877 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 22:15.


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