Raised This Month: $ Target: $400
 0% 

[HELP] Play MP3


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BaD CopY
Senior Member
Join Date: Oct 2014
Location: Home
Old 05-09-2015 , 18:12   [HELP] Play MP3
Reply With Quote #1

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...
BaD CopY is offline
Send a message via Yahoo to BaD CopY Send a message via Skype™ to BaD CopY
Depresie
Veteran Member
Join Date: Nov 2013
Old 05-09-2015 , 18:18   Re: [HELP] Play MP3
Reply With Quote #2

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?

Last edited by Depresie; 05-09-2015 at 18:27.
Depresie is offline
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 05-09-2015 , 18:35   Re: [HELP] Play MP3
Reply With Quote #3

Quote:
Originally Posted by Depresie View Post
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 .
Freezo Begin is offline
BaD CopY
Senior Member
Join Date: Oct 2014
Location: Home
Old 05-10-2015 , 06:41   Re: [HELP] Play MP3
Reply With Quote #4

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 ?

Last edited by BaD CopY; 05-10-2015 at 07:21.
BaD CopY is offline
Send a message via Yahoo to BaD CopY Send a message via Skype™ to BaD CopY
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 05-10-2015 , 06:57   Re: [HELP] Play MP3
Reply With Quote #5

Why not change it to sound/folder(media)/bla.mp3 ??
Freezo Begin is offline
BaD CopY
Senior Member
Join Date: Oct 2014
Location: Home
Old 05-10-2015 , 07:20   Re: [HELP] Play MP3
Reply With Quote #6

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...
BaD CopY is offline
Send a message via Yahoo to BaD CopY Send a message via Skype™ to BaD CopY
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 05-10-2015 , 08:41   Re: [HELP] Play MP3
Reply With Quote #7

Quote:
Originally Posted by BaD CopY View Post
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
__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 05-10-2015 , 07:36   Re: [HELP] Play MP3
Reply With Quote #8

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 !!
Freezo Begin is offline
BaD CopY
Senior Member
Join Date: Oct 2014
Location: Home
Old 05-10-2015 , 07:38   Re: [HELP] Play MP3
Reply With Quote #9

But player already have thet sound in his cs 1.6 man...
BaD CopY is offline
Send a message via Yahoo to BaD CopY Send a message via Skype™ to BaD CopY
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-10-2015 , 08:40   Re: [HELP] Play MP3
Reply With Quote #10

Quote:
Originally Posted by BaD CopY View Post
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.
__________________
Kia is offline
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 20:14.


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