|
|
#1 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: May 2011
Location: Russia, Vladivostok
Posts: 729
Reputation: 43
|
Server Broadcaster Ver 1.6.0Author: jhonyxakep Mail:jhonyxakep@qip.ru ICQ:354794596 Jabber:jhonyxakep@qip.ru Description: This plugin allows you to turn the server SA:MP in full online radio station The plugin uses the BASS library (http://un4seen.com) to work with audio files. Installation: Put the files from the plugins in the plugins folder on the server. Windows: Files from system\win\ directory should be placed in the root directory of the server (the ones where the samp-server.exe), or the windows system directory *nix: Files from system\nix\ should be put in the folder /lib/, /usr/lib/, /usr/local/lib/. Add the plug-in in plugins section in SA: MP config. Include radio.inc to your script. [B] For *nix you must install stdin/stdout encoder (Lame for mp3. Installing Lame for Debian/Ubuntu: apt-get install lame) [/ B] Use: Plugin functions: PlaySoundFileToStream(file[]); - add file to stream PlaySoundUrlToStream(file[]); - add Url to stream IsServerActive(); - Is Server Active true/false StopPlaying(); - delete current file from stream SoundServerStart(commandline[],port[]); - Start the server SoundServerStop(); - Stop the server KickListener(listener[]); - kick listener and call OnListenerDisconnect SetStationNameURL(name[],URL[]); - sets Station name, and site URL. To start the server use SoundServerStart. First argument - encoder command line. For MP3 cast use (44100 Hz, 128 kb/sec) "lame -r -s 44100 -b 128 –" Second argument - the IP address and port number to accept client connections on... "xxx.xxx.xxx.xxx ort", or port only. If you want start Server on 8000 port just use "8000". After starting the server, the file must be added to the stream by function PlaySoundFileToStream/PlaySoundUrlToStream. file - MP3, OGG, WAV, AIFF files, which will be played on the stream. WARNING! You must call StopPlaying before add new file to stream ![]() Ôóíêöèÿ SoundServerStop îñòàíàâëèâàåò ñåðâåð. Callbacks: OnSoundFileEnd(); - Called when the reached the end of the current file, or can not play more Changed: OnListenerConnect(listener[],path[]); - on new listener connected. Listener contain ip : port of listener. Path - URL part after http://server ort/OnListenerDisonnect(listener[]); - on listener disconnected Attachment = Include + Example Script + linux and windows version of plugin + Source code Download: in attachment Sorry for my bad English. ![]() Original post: http://forum.sa-mp.com/showthread.php?p=1720525 Last edited by jhonyxakep; 11/03/2012 at 01:48 AM. |
|
|
|
|
|
#2 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Jun 2010
Location: Under your chair
Posts: 236
Reputation: 5
|
Good work! Thanks..
|
|
|
|
|
|
#3 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Mar 2011
Location: Al Ain, UAE. Homeland: Bangladesh.
Posts: 1,300
Reputation: 673
|
I suffered a lot when I was trying to make such a plugin. But, really, a great help! Thanks!!
Last edited by iPLEOMAX; 09/03/2012 at 08:13 AM. |
|
|
|
|
|
#4 |
|
Banned
![]() Join Date: Apr 2011
Location: Birmingham, UK
Posts: 1,626
Reputation: 368
|
So this plugin would turn a samp server into a shoutcast/icecast server ?
|
|
|
|
|
|
#5 | |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: May 2011
Location: Russia, Vladivostok
Posts: 729
Reputation: 43
|
Quote:
Just translate problems
|
|
|
|
|
|
|
#6 |
|
Banned
![]() Join Date: Apr 2011
Location: Birmingham, UK
Posts: 1,626
Reputation: 368
|
So the server owner would be able to broadcast music too like a shoutcast radio station does ?
|
|
|
|
|
|
#7 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: May 2011
Location: Russia, Vladivostok
Posts: 729
Reputation: 43
|
Yes. This is a standalone server
|
|
|
|
|
|
#8 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Apr 2010
Location: Lithuania
Posts: 1,352
Reputation: 130
|
Why is this needed? What Pro's do you see holding a radio station on a sa-mp server?
|
|
|
|
|
|
#9 | |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: May 2011
Location: Russia, Vladivostok
Posts: 729
Reputation: 43
|
Quote:
|
|
|
|
|
|
|
#10 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Feb 2012
Location: Europe/Romania
Posts: 244
Reputation: 11
|
Awesome work, i will test this later
Keep it up :P
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| San Andreas Radio Station audio not working | Diego_Martinz | Client Support | 4 | 13/06/2012 01:55 PM |
| How do i play this radio station? | emokidx | Scripting Help | 3 | 19/02/2012 12:27 PM |
| Create connection to radio station | vection | Help Archive | 0 | 31/08/2010 11:47 AM |
| [HELP PL0X] Radio station. | tehroxor | Client Support | 7 | 11/02/2010 03:44 PM |