Raised This Month: $ Target: $400
 0% 

Issue with precache sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 08-09-2011 , 01:06   Issue with precache sound
Reply With Quote #1

For some reason my games telling me it cant precache the sounds
There on the server and fast dl they download to the client but they dont play...

PHP Code:
new const g_medic_calls[][] =
{
"xtrememedic/medic_call1.wav",
"xtrememedic/medic_call2.wav",
"xtrememedic/medic_call3.wav",
"xtrememedic/medic_call4.wav"
};

new const 
g_medic_done[] = "xtrememedic/medic_done.wav";
new const 
g_medic_heal[] = "xtrememedic/medic_healing.wav";

public 
plugin_precache()
{
for(new 
0sizeof(g_medic_calls); i++)
{
precache_sound(g_medic_calls[i]);
}

precache_sound(g_medic_done);
precache_sound(g_medic_heal);
}

emit_sound(idCHAN_ITEMg_medic_heal1.0ATTN_NORM0PITCH_NORM);
emit_sound(idCHAN_ITEMg_medic_calls[random(sizeof(g_medic_calls))], 1.0ATTN_NORM0PITCH_NORM);
emit_sound(idCHAN_ITEMg_medic_done1.0ATTN_NORM0PITCH_NORM); 
There ya go... how they are delcared, precached, and used

I dont see a damn thing wrong with them.


EDIT : No idea wtf was going on... but fixed now

Last edited by Arkshine; 08-09-2011 at 04:59.
Doc-Holiday is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-09-2011 , 04:14   Re: Issue with precache sound
Reply With Quote #2

most likely you were adding "sound" path to it which isn't required, precache_sound() starts in sound folder, the other precache functions start in mod dir (cstrike for example).

But why don't you leave the original post be ?
__________________
Hunter-Digital is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 08-09-2011 , 06:06   Re: Issue with precache sound
Reply With Quote #3

Quote:
Originally Posted by Hunter-Digital View Post
most likely you were adding "sound" path to it which isn't required, precache_sound() starts in sound folder, the other precache functions start in mod dir (cstrike for example).

But why don't you leave the original post be ?
What you mean i didnt change this one...

That is the original post thats what i dont get.. lol looks fine to me and then all of a sudden started working haha
Doc-Holiday is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-09-2011 , 07:01   Re: Issue with precache sound
Reply With Quote #4

Quote:
Originally Posted by Doc-Holiday View Post
What you mean i didnt change this one...

That is the original post thats what i dont get.. lol looks fine to me and then all of a sudden started working haha
Yes, that is the original post, reverted by arkshine, but when I posted it was edited by you and it had no codes or anything of this length, it was just saying that you solved it, but what, I had no clue

Also, if you didn't get what I was saying about paths:
precache_sound("file.wav") == "mod/sound/file.wav"
precache_model("file.spr") == "mod/file.spr"
precache_generic("file.mp3") == "mod/file.mp3"
If you still don't get it... try harder because I won't explain again.
__________________
Hunter-Digital is offline
avril-lavigne
Banned
Join Date: Apr 2009
Old 08-09-2011 , 06:31   Re: Issue with precache sound
Reply With Quote #5

when you precache
you are using
precache_sound

it means that it starts to precache INSIDE of /cstrike/sound folder

you dont have to write precache_sound("SOUND/ ... dont do this
only use for mp3s precache_generic("sound/ ,,,, bla bla.mp3 )

check path`s once again. check if Hz of sound is correct , try to play the sound from cs console.
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc
avril-lavigne is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 08-10-2011 , 02:36   Re: Issue with precache sound
Reply With Quote #6

i know what they mean... i know how they are used the question i had weasnt about that... so i have no idea wtf your talking about and why your going on about that lol

I was asking why the code wasnt working... All of a sudden it started working.
Doc-Holiday is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-10-2011 , 04:41   Re: Issue with precache sound
Reply With Quote #7

Code doesn't *suddenly* work, there are various things that could have happen and it's pointless to go over them now :}
__________________
Hunter-Digital is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 08-10-2011 , 05:30   Re: Issue with precache sound
Reply With Quote #8

Quote:
Originally Posted by Hunter-Digital View Post
Code doesn't *suddenly* work, there are various things that could have happen and it's pointless to go over them now :}
im not saying it just started working but i dont get why i cant precache a sound when the code was correct the only thing i changed else in the code was set a task for 0.05 seconds because when you press 'use' it gives off a beep sound... and it plays over the medic sound.
Doc-Holiday is offline
modernwarfare
Senior Member
Join Date: Aug 2011
Location: sweden
Old 08-19-2011 , 17:10   Re: Issue with precache sound
Reply With Quote #9

i think the problem was with me

but it fixed thx
__________________
Im supporting/coding XP Mod Plugin
Free Palestine
R.I.P. The 2967 American people that lost their lives 9/11 and R.I.P.
The 48,644 Afghan and 1,690,903 Iraqi people that paid the ultimate price for a crime they did not commit.



modernwarfare is offline
Send a message via MSN to modernwarfare Send a message via Skype™ to modernwarfare
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 03:29.


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