SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Scripting Help (https://forum.sa-mp.com/forumdisplay.php?f=12)
-   -   AudioStream (https://forum.sa-mp.com/showthread.php?t=373061)

oliver12 29/08/2012 06:12 AM

AudioStream
 
Hello! I wanted to create a radio system for my server, but it doesn't work. I show te actual code(everything else is right).
PHP Code:

    if(response)
    {
        if(
listitem == 0)
        {
             
PlayAudioStreamForPlayer(playerid,"http://stream.akaver.com/streamgen.php?stream=powerhit&format=ogg&quality=low");
             
SendClientMessage(playeridCOLOR_YELLOW,"Nüüd mängib raadio Power Hit");
            
APlayerData[playerid][Raadio] = true;
        }
        if(
listitem == 1)
        {
            
PlayAudioStreamForPlayer(playerid,"http://striiming.trio.ee:8008/elmar.mp3");
             
SendClientMessage(playeridCOLOR_YELLOW,"Nüüd mängib raadio Elmar");
               
APlayerData[playerid][Raadio] = true;
        }
        if(
listitem == 2)
        {
            
PlayAudioStreamForPlayer(playerid,"http://streamer.akaver.com/streamgen.php?stream=skyplus&format=mp3&quality=hi");
             
SendClientMessage(playeridCOLOR_YELLOW,"Nüüd mängib raadio Sky Plus");
               
APlayerData[playerid][Raadio] = true;
        }
    }
    return 
1

The code works, because I can see the SendClientMessage, but that Audio Stream: ..... doesn't show up and the music doesn't play too.

Dima_Tkach 29/08/2012 06:47 AM

Re: AudioStream
 
Link on the radio change.

Akira297 29/08/2012 06:51 AM

Re: AudioStream
 
Code:

ListItem == 0 and ListItem == 2
. Will not due to the way they're linked.

However,
Code:

ListItem == 1
will work.

oliver12 29/08/2012 07:16 AM

Re: AudioStream
 
Didn't change anything and all 3 works :D IDK why it didn't work before.

jimis 29/08/2012 08:14 AM

Re: AudioStream
 
where i can find online radio's websites?

clarencecuzz 29/08/2012 08:21 AM

Re: AudioStream
 
You just need file streaming websites, an example of this is kiwi6.com

NOTE: If the music does not play, it can be due to slow internet, making the music buffer more slowly, just like Youtube videos etc.

Googling radio websites is also a good idea, just make sure it's not some boring educational radio stream or something like that -____-


All times are GMT. The time now is 12:14 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.