AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Solved] Sound is not Playing (https://forums.alliedmods.net/showthread.php?t=140319)

Stylaa 10-10-2010 16:55

[Solved] Sound is not Playing
 
the sound dont plays in my plugin

heres my Code

What did i Wrong?

PHP Code:

new badsound[]             = "sound/bad.mp3"

in Plugin Precache

precache_generic
(badsound)

and 
Finaly to play it

client_cmd
(0"mp3 play ^"%s^""badsound


SaM.ThE.MaN 10-11-2010 04:22

Re: Sound is not Playing
 
When do you want it to play?

ConnorMcLeod 10-11-2010 04:33

Re: Sound is not Playing
 
Try to put in in your game folder, open your console and type :

mp3 play sound/bad.mp3

If the sound is not playing, you have to re-encode it.

SaM.ThE.MaN 10-11-2010 04:58

Re: Sound is not Playing
 
Quote:

Originally Posted by ConnorMcLeod (Post 1321874)
Try to put in in your game folder, open your console and type :

mp3 play sound/bad.mp3

If the sound is not playing, you have to re-encode it.

I thought only .wav files are playable...

Hunter-Digital 10-11-2010 05:01

Re: Sound is not Playing
 
Quote:

Originally Posted by SaM.ThE.MaN (Post 1321892)
I thought only .wav files are playable...

You can't play mp3 files in emit_sound(), but using console commands like mp3 play, you can.

SaM.ThE.MaN 10-11-2010 05:02

Re: Sound is not Playing
 
Oh , i wouldnt wanna use .mps =.= , not that usefull if it plays using console commands

Hunter-Digital 10-11-2010 05:05

Re: Sound is not Playing
 
That's not really a helpfull comment.

Still, an mp3 file is much smaller than it's wav counterpart, so yeah, it IS usefull when you can download only few kilobytes instead of a few megabytes.

I use mp3 files for the announcer in my CTF mod, that allows quick file downloads and still, each player can adjust their volume by using mp3volume (or the in-game chat commands I provided)

SaM.ThE.MaN 10-11-2010 05:06

Re: Sound is not Playing
 
Not really .. convert the mp3 to .wav ... it just adds a few bits after converting

Hunter-Digital 10-11-2010 05:12

Re: Sound is not Playing
 
[IMG]http://img121.**************/img121/8113/clipboard01kaf.jpg[/IMG]

Those "few bits" are 5 times the mp3 original size.

SaM.ThE.MaN 10-11-2010 05:14

Re: Sound is not Playing
 
Quote:

Originally Posted by Hunter-Digital (Post 1321904)
[IMG]http://img121.**************/img121/8113/clipboard01kaf.jpg[/IMG]

Those "few bits" are 5 times the mp3 original size.

Quote:

few megabytes.
I thought they were Megabytes O.o


All times are GMT -4. The time now is 10:24.

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