Raised This Month: $ Target: $400
 0% 

[HELP] Play .waw file


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TudorLaLeagane
Junior Member
Join Date: Mar 2018
Old 12-25-2018 , 18:18   [HELP] Play .waw file
Reply With Quote #1

Hi! I just want to play a .waw file.

Here is part of my code:

Code:
new SoundNames[SoundNR][] =
{
	"Yes",
	"May The Force Be With You",
	"Helloo Babee",
	"The One and Only"
}
new SoundNamesID[SoundNR][] =
{
	"yes.waw",
	"FORCE.WAW",
	"HIBABE.WAW",
	"THEONE.WAW"
}
and

Code:
	new Name[33]
	get_user_name(id,Name,charsmax(Name))
	if(SoundID[id][item] == 1)
	{
		chat_color(id,"!y[!gSOUNDS!y]!g Ai ales !team%s !gsunetul va fi aplicat!",SoundNames[item])
		new sBuffer[128]
		format(sBuffer,127,"^"%s^"",SoundNamesID[item])
		emit_sound(id,CHAN_AUTO,sBuffer,VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
		//client_cmd( 0, "spk ^"%s^"", SoundNamesID[item] );
		HasSound[id] = 1
		format(HSoundID[id],31,"%s",SoundNamesID[item])
		chat_color(0,"!y[!gSOUNDs!y]!g Jucatorul !team%s !ga ales sunetul !team%s!g!",Name,SoundNames[item])
	}
It doesn't want to play in any way possible...

EDIT: PRECACHE
Code:
precache_sound("FORCE.WAW")
	precache_sound("HIBABE.WAW")
	precache_sound("THEONE.WAW")
	precache_sound("yes.waw")

Last edited by TudorLaLeagane; 12-25-2018 at 18:19.
TudorLaLeagane is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-25-2018 , 20:41   Re: [HELP] Play .waw file
Reply With Quote #2

Try .wav instead of .waw?
__________________
Bugsy is offline
TudorLaLeagane
Junior Member
Join Date: Mar 2018
Old 12-26-2018 , 15:12   Re: [HELP] Play .waw file
Reply With Quote #3

Yeah... Now it's downloading the file, but it doesn't play it
TudorLaLeagane is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-26-2018 , 17:45   Re: [HELP] Play .waw file
Reply With Quote #4

Show your full code.
__________________
Bugsy is offline
TudorLaLeagane
Junior Member
Join Date: Mar 2018
Old 12-27-2018 , 04:52   Re: [HELP] Play .waw file
Reply With Quote #5

I managed to make it play. Here is the code that runs as it should:
Code:
new SoundNames[SoundNR][] =
{
	"Yes",
	"May The Force Be With You",
	"Helloo Babee",
	"The One and Only",
	"YMCA"
}
new SoundNamesID[SoundNR][] =
{
	"misc/yes.wav",
	"misc/FORCE.WAV",
	"misc/HIBABE.WAV",
	"misc/THEONE.WAV",
	"misc/YMCA.WAV"
}
Code:
new Name[33]
	get_user_name(id,Name,charsmax(Name))
	if(SoundID[id][item] == 1)
	{
		chat_color(id,"!y[!gSOUNDS!y]!g Ai ales !team%s !gsunetul va fi aplicat!",SoundNames[item])
		client_cmd( id, "spk ^"%s^"", SoundNamesID[item] );
		HasSound[id] = 1
		format(HSoundID[id],31,"%s",SoundNamesID[item])
		chat_color(0,"!y[!gSOUNDs!y]!g Jucatorul !team%s !ga ales sunetul !team%s!g!",Name,SoundNames[item])
	}
Code:
precache_sound("misc/FORCE.WAV")
	precache_sound("misc/HIBABE.WAV")
	precache_sound("misc/THEONE.WAV")
	precache_sound("misc/yes.wav")
	precache_sound("misc/YMCA.WAV")
TudorLaLeagane is offline
eat1k
Senior Member
Join Date: Apr 2018
Old 12-27-2018 , 06:55   Re: [HELP] Play .waw file
Reply With Quote #6

Why .WAV instead of .wav?
__________________
eat1k is offline
TudorLaLeagane
Junior Member
Join Date: Mar 2018
Old 12-27-2018 , 16:47   Re: [HELP] Play .waw file
Reply With Quote #7

It's just that i just copied the file name, and it was all Upper Case and i was just lazy to change it.
TudorLaLeagane is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-28-2018 , 08:39   Re: [HELP] Play .waw file
Reply With Quote #8

Use "spk misc/yes.wav" in your console to see if the sound is even working in CS.
__________________

Last edited by OciXCrom; 12-28-2018 at 08:39.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
TudorLaLeagane
Junior Member
Join Date: Mar 2018
Old 12-28-2018 , 12:05   Re: [HELP] Play .waw file
Reply With Quote #9

It works now, with that code, but idk why it didn't worked with the first implementation
TudorLaLeagane is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-28-2018 , 12:26   Re: [HELP] Play .waw file
Reply With Quote #10

You are missing the "misc/" folder path?
__________________
Bugsy 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 07:38.


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