Raised This Month: $ Target: $400
 0% 

Play MP3


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
imnoobsvk
Junior Member
Join Date: Jun 2011
Old 04-18-2012 , 14:20   Play MP3
Reply With Quote #1

Hello, please how I can play mp3 from menu to all players?
imnoobsvk is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 04-18-2012 , 15:53   Re: Play MP3
Reply With Quote #2

Code:
new const MP3_TO_PLAY[ ] = "sound/mp3/your_fucking_sound.mp3"

public plugin_precache( )
         precache_generic( MP3_TO_PLAY );


client_cmd( 0, "mp3 play %s", MP3_TO_PLAY );
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
imnoobsvk
Junior Member
Join Date: Jun 2011
Old 04-18-2012 , 17:04   Re: Play MP3
Reply With Quote #3

Quote:
Originally Posted by NiHiLaNTh View Post
Code:
new const MP3_TO_PLAY[ ] = "sound/mp3/your_fucking_sound.mp3"

public plugin_precache( )
         precache_generic( MP3_TO_PLAY );


client_cmd( 0, "mp3 play %s", MP3_TO_PLAY );
thanks now its working :-*
imnoobsvk is offline
imnoobsvk
Junior Member
Join Date: Jun 2011
Old 04-19-2012 , 10:47   Re: Play MP3
Reply With Quote #4

hm only who can hear it its me

how i can make it that all can hear it?
imnoobsvk is offline
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 04-19-2012 , 11:40   Re: Play MP3
Reply With Quote #5

It should work, though.

Try
PHP Code:
new playersAll[32]
get_players(Allplayers"ch")
for(new 
i;i<players;i++)
  
client_cmdAll[i], "mp3 play %s"MP3_TO_PLAY ); 
NVM, the problem is that only you have that MP3 in cstrike, most likely.
__________________
My nickname is nucLeaR, I just screwed up at registering and didn't want to change after that X_X.

Last edited by NucL3ra; 04-19-2012 at 11:44.
NucL3ra is offline
Send a message via Yahoo to NucL3ra
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 04-19-2012 , 12:00   Re: Play MP3
Reply With Quote #6

Quote:
Originally Posted by NucL3ra View Post
It should work, though.

Try
PHP Code:
new playersAll[32]
get_players(Allplayers"ch")
for(new 
i;i<players;i++)
  
client_cmdAll[i], "mp3 play %s"MP3_TO_PLAY ); 
NVM, the problem is that only you have that MP3 in cstrike, most likely.
the code nihilant posted should work just fine
EpicMonkey is offline
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 04-19-2012 , 13:25   Re: Play MP3
Reply With Quote #7

As I said.
The problem is, most likely, that he does not force players to download the mp3.
__________________
My nickname is nucLeaR, I just screwed up at registering and didn't want to change after that X_X.
NucL3ra is offline
Send a message via Yahoo to NucL3ra
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 04-19-2012 , 15:20   Re: Play MP3
Reply With Quote #8

He surely does with precache_generic, isnt he?
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
imnoobsvk
Junior Member
Join Date: Jun 2011
Old 04-19-2012 , 16:51   Re: Play MP3
Reply With Quote #9

its working, sorry, i dont put the mp3 on server, my bad
imnoobsvk 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 07:50.


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