Change Hook Sound

Started by crossbow
30/05/2007 15:44
Page 1 of 2
crossbow30/05/2007 15:44

Hi guys can u tell how can i change the sound of the hook?

-AvAtAr- mapper30/05/2007 16:50

Change

emit_sound(id,CHAN_STATIC,"weapons/xbow_hit2.wav",1.0,ATTN_NORM,0,PITCH_NORM)

for example :

emit_sound(id,CHAN_STATIC,"misc/killChicken.wav.wav",1.0,ATTN_NORM,0,PITCH_NORM)

The sound must to be in sound

crossbow30/05/2007 19:12

sry but i dont understand you AvAtAr-kzfr... :((

Murvelman30/05/2007 20:19

I asked this 2 times in the chatbox and 1 time in the channel, no one answered :P
Thank you AvAtAr!

trb31/05/2007 07:51

I asked this 2 times in the chatbox and 1 time in the channel, no one answered :P
Thank you AvAtAr!

Murvelman


it's better in forum :P


btw maybe there is somewhere a line with

precache .... and this sound

if yes, change that 2 ;)

dEMolite mapper31/05/2007 09:37

thats ri´ght trouble

all sounds in the hlengine which will be played needs to be precached before it can beplayed
[ Edited 05/31/07 - 09:37:46 ]

PrEn1uMz31/05/2007 13:08

crossbow, which plugin are u using ?

in kz_multiplugin :

line 209
replace
precache_sound("weapons/xbow_hit2.wav")
by
precache_sound("yoursound.wav")

line 1428
replace
emit_sound(id, CHAN_STATIC, "weapons/xbow_hit2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
by
emit_sound(id, CHAN_STATIC, "yoursound.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)

in prokreedz_hook :

line 23
replace
precache_sound("weapons/xbow_hit2.wav")
by
precache_sound("yoursound.wav")

line 97
replace
emit_sound(id,CHAN_STATIC,"weapons/xbow_hit2.wav",1.0,ATTN_NORM,0,PITCH_NORM)
by
emit_sound(id,CHAN_STATIC,"yoursound.wav",1.0,ATTN_NORM,0,PITCH_NORM)

-AvAtAr- mapper01/06/2007 15:49

Ha yes,

I had forgotten the precache

+1 PrEn1iuMz

crossbow05/06/2007 20:49

PrEn1uMz = N1

Mehz21/07/2007 22:36

SV_StartSound: shmod/frieza_destructodisc.wav not precached (0)

Im getting this error :S
[ Edited 07/21/07 - 22:36:40 ]

puppetz mapper21/07/2007 22:50

Yo, I've got a problem too. I just removed the ProKreedz hook sound, by replacing:

precache_sound("weapons/xbow_hit2.wav")
with
precache_sound(" ")

emit_sound(id,CHAN_STATIC,"weapons/xbow_hit2.wav",1.0,ATTN_NORM,0,PITCH_NORM)
with
emit_sound(id,CHAN_STATIC," ",1.0,ATTN_NORM,0,PITCH_NORM)

(in prokreedz_hook.sma of course)

EDIT: I found out how now, you just have to put a slash in the middle of the " ".
[ Edited 07/21/07 - 23:05:07 ]

SchlumPF22/07/2007 00:17

just remove
precache_sound("weapons/xbow_hit2.wav")
and
emit_sound(id,CHAN_STATIC,"weapons/xbow_hit2.wav",1.0,ATTN_NORM,0,PITCH_NORM)
^^

PrEn1uMz22/07/2007 01:44

just remove
precache_sound("weapons/xbow_hit2.wav")
and
emit_sound(id,CHAN_STATIC,"weapons/xbow_hit2.wav",1.0,ATTN_NORM,0,PITCH_NORM)
^^

PaPa SchlumPF

+1 lol

electron22/07/2007 02:49

Hi.

Is it possible to make the hook play a random sound?

It's kinda dull to have the same sound over and over. =)

BooLiSH22/07/2007 02:57

removed the lines/saved/restarted cs => sound still there

puppetz mapper22/07/2007 03:00

Have you compiled it BooLiSH?

dEMolite mapper22/07/2007 11:19

didn't think so :D

NoEx mapper22/07/2007 11:48

Hi.

Is it possible to make the hook play a random sound?

It's kinda dull to have the same sound over and over. =)

electron


=>

plugin_precache(){
precache_sound("sound1.wav")
precache_sound("sound2.wav")
precache_sound("sound3.wav")
return PLUGIN_CONTINUE
}

public sound_emitter_func_blabla(){
new x = random_num(1,3)
switch (x){
case 1:
{
emit_sound(id,CHAN_STATIC,"sound1.wav",1.0,ATTN_NORM,0,PITCH_NORM)
}
case 2:
{
emit_sound(id,CHAN_STATIC,"sound2.wav",1.0,ATTN_NORM,0,PITCH_NORM)
}
case 3:
{
emit_sound(id,CHAN_STATIC,"sound3.wav",1.0,ATTN_NORM,0,PITCH_NORM)
}
}
return PLUGIN_CONTINUE
}


Advice: Better use precache_generic for mp3 files.

electron22/07/2007 13:08

Thanks NoEx!

Now if i could only solve this problem..
Solved the problem. But got another problem now.

I have added many sounds, and the sounds get set on repeat. So they just keep going and going, really annoying.
edit. Not all sounds are repeated.

thanks!



[ Edited 07/22/07 - 13:55:34 ]

BooLiSH22/07/2007 17:05

can i use my "programmers notepad" therefor which i used for school when we learned C++?

Page 1 of 2

Please log in to post replies.