AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [HELP] Play MP3 (https://forums.alliedmods.net/showthread.php?t=262654)

BaD CopY 05-09-2015 18:12

[HELP] Play MP3
 
Can anyone solve my problem and give me answer on my question: Did AMXX plugins allow to play mp3 music files from valve folder ?

PHP Code:

client_cmd(id"mp3 play media/Something.mp3"

This code doesn't work for me... 'media' folder with music is in 'valve' folder in my server...

Depresie 05-09-2015 18:18

Re: [HELP] Play MP3
 
yes, it does... in the following example both cstrike/sound folder and valve/sound folder will be checked for the sound file
Code:

sound = "ambience/blabla.wav"
what are you trying to do more exactly?

Freezo Begin 05-09-2015 18:35

Re: [HELP] Play MP3
 
Quote:

Originally Posted by Depresie (Post 2295023)
yes, it does... in the following example both cstrike/sound folder and valve/sound folder will be checked for the sound file
Code:

sound = "ambience/blabla.wav"
what are you trying to do more exactly?


This is not what he want try this simple Function :

Code:
stock _playSound(id, const sound[]) {     if (equal(sound[strlen(sound)-4], ".mp3"))         client_cmd(id, "mp3 play ^"sound/%s^"", sound)     else         client_cmd(id, "spk ^"%s^"", sound) }

usage :

_playSound( index , "media/Something.mp3")

And before that make sure that the media file existe . I would recommend to add your sound file in the original folder .

BaD CopY 05-10-2015 06:41

Re: [HELP] Play MP3
 
But look, I want to player mp3 from valve/media/... when player is connecting to the server.
I make this code but it's does not work for me:

PHP Code:

public client_connect(id)
{
          
client_cmd(id"mp3 play media/something.mp3")


Why it's does not work ?

Freezo Begin 05-10-2015 06:57

Re: [HELP] Play MP3
 
Why not change it to sound/folder(media)/bla.mp3 ??

BaD CopY 05-10-2015 07:20

Re: [HELP] Play MP3
 
Becouse I don't want to precache sounds... In every cs 1.6 have valve/media folders with music and I want thet music to player when player is connecting...

Freezo Begin 05-10-2015 07:36

Re: [HELP] Play MP3
 
What are you saying euh !! Its necessary to add your sound in precache . Because the client need to download in his folder as well to read it !!

BaD CopY 05-10-2015 07:38

Re: [HELP] Play MP3
 
But player already have thet sound in his cs 1.6 man...

Kia 05-10-2015 08:40

Re: [HELP] Play MP3
 
Quote:

Originally Posted by BaD CopY (Post 2295172)
But player already have thet sound in his cs 1.6 man...

precache != only downloading.
Think precaching as putting files on a list I need for this map.

indraraj striker 05-10-2015 08:41

Re: [HELP] Play MP3
 
Quote:

Originally Posted by BaD CopY (Post 2295168)
Becouse I don't want to precache sounds... In every cs 1.6 have valve/media folders with music and I want thet music to player when player is connecting...

here you go what you want
https://forums.alliedmods.net/showth...?t=4356?t=4356


All times are GMT -4. The time now is 20:14.

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