AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   emiting a ambient sound mp3 ? (https://forums.alliedmods.net/showthread.php?t=62305)

Peoples Army 10-23-2007 17:48

emiting a ambient sound mp3 ?
 
i want to emit a ambient sound , i have a mp3 , i want admins to be able to turn on and off . want it to repeat like a ambient sound though . and it has to be mp3 .

ConnorMcLeod 10-23-2007 18:04

Re: emiting a ambient sound mp3 ?
 
It has to be a .wav

Peoples Army 10-23-2007 18:30

Re: emiting a ambient sound mp3 ?
 
no it has to be a wav if you use that command .

this doesnt seem to work here

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "BFM Sounds" #define VERSION "1.0" #define AUTHOR "Peoples Army" public plugin_init() {  register_plugin(PLUGIN, VERSION, AUTHOR)  register_concmd("bfm_sound_on","sound_on");  register_concmd("bfm_sound_off","sound_off");   } public plugin_precache() {  precache_sound("sound/misc/bfm.mp3"); } public bfm_sound_on() {  client_cmd(0,"spk sound/misc/bfm.mp3");  set_task(63.0,"bfm_sound_on",1,"",0,"b"); } public bfm_sound_off() {  remove_task(1); }

M249-M4A1 10-23-2007 20:30

Re: emiting a ambient sound mp3 ?
 
Change:
PHP Code:

client_cmd(0,"spk sound/misc/bfm.mp3"); 

To:
PHP Code:

client_cmd(0,"mp3 play sound/misc/bfm.mp3"); 

In bfm_sound_off() you may also want to stop playing the sound immediately, do this by doing:

PHP Code:

client_cmd(0,"mp3 stop"); 


kp_uparrow 10-23-2007 23:07

Re: emiting a ambient sound mp3 ?
 
and mp3 sounds volume differ from client to client, one might mute the mp3 and dont even know it

M249-M4A1 10-23-2007 23:09

Re: emiting a ambient sound mp3 ?
 
Quote:

Originally Posted by kp_uparrow (Post 545568)
and mp3 sounds volume differ from client to client, one might mute the mp3 and dont even know it

Author/player's fault. Author refuses to use .wav; Player has mp3 volume at zero. Can't say anything more than that!

kp_uparrow 10-23-2007 23:11

Re: emiting a ambient sound mp3 ?
 
damn wav arent compressed! so many times bigger! and take up a precache slot

M249-M4A1 10-23-2007 23:14

Re: emiting a ambient sound mp3 ?
 
Yes they do, but they are easier to use. Guess that's where the choice of mp3/wav really comes in

Peoples Army 10-24-2007 22:19

Re: emiting a ambient sound mp3 ?
 
Quote:

Originally Posted by kp_uparrow (Post 545572)
damn wav arent compressed! so many times bigger! and take up a precache slot

thats my problem , the mp3 is 1 minute and 3 secs . so if went wav teh downlado would be an hour lol .

will using clinet cmd play make it play continuously?

M249-M4A1 10-24-2007 22:44

Re: emiting a ambient sound mp3 ?
 
You should look into a fast download server, and defining compression parameters for .wav files (8-bit 22khz mono)


All times are GMT -4. The time now is 01:22.

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