SA-MP Forums Archive
StreamAudioForPlayer - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: StreamAudioForPlayer (/showthread.php?tid=570988)



StreamAudioForPlayer - Prokill911 - 15.04.2015

Hello, I'm trying make it so I can stream radio stations...

But I can't get it to work

example station

http://radio.securenetsystems.net/ra...lSign=SPLASHFM


http://rp.xrad.io/?id=msh4

I can't get either to work,
Anyone able to help?


Re: StreamAudioForPlayer - fuckingcruse - 15.04.2015

Check this out

https://sampwiki.blast.hk/wiki/PlayAudioStreamForPlayer

and what are you using strcmp or ZCMD?


Re: StreamAudioForPlayer - Adi007 - 15.04.2015

Here are some commands (ZCMD):
pawn Код:
CMD:radiohit(playerid)
{
    PlayAudioStreamForPlayer(playerid, "http://www.radio-hit.ro/asculta.m3u");
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~w~buffering ~p~radio hit~w~...", 1500, 3);
    return 1;
}
//--------------------------------------------------------------------------------------------------------------------------------
CMD:radiowish(playerid)
{
    PlayAudioStreamForPlayer(playerid, "http://www.radiowish.ro/live.m3u");
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~w~buffering ~p~radio wish~w~...", 1500, 3);
    return 1;
    }
    //--------------------------------------------------------------------------------------------------------------------------------
CMD:radiozu(playerid)
{
    PlayAudioStreamForPlayer(playerid, "http://www.radiozu.ro/live.m3u");
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~w~buffering ~p~radio zu~w~...", 1500, 3);
    return 1;
}
//--------------------------------------------------------------------------------------------------------------------------------
CMD:radiohiphop(playerid)
{
    PlayAudioStreamForPlayer(playerid, "http://radioromanian.net/hiphop.pls");
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~w~buffering ~p~radio hip-hop~w~...", 1500, 3);
    return 1;
}
//--------------------------------------------------------------------------------------------------------------------------------
CMD:radiopopular(playerid)
{
    PlayAudioStreamForPlayer(playerid, "http://radioromanian.net/popular.pls");
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~w~buffering ~p~radio popular~w~...", 1500, 3);
    return 1;
}
//--------------------------------------------------------------------------------------------------------------------------------
CMD:romanianmanele(playerid)
{
    PlayAudioStreamForPlayer(playerid, "http://radioromanian.net/manele.pls");
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~w~buffering ~p~radio manele~w~...", 1500, 3);
    return 1;
}
//--------------------------------------------------------------------------------------------------------------------------------
CMD:profm(playerid)
{
    PlayAudioStreamForPlayer(playerid, "http://stream.profm.ro:8012/profm.mp3");
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~w~buffering ~p~pro fm~w~...", 1500, 3);
    return 1;
}
//--------------------------------------------------------------------------------------------------------------------------------
CMD:rockmusic(playerid)
{
    PlayAudioStreamForPlayer(playerid, "http://www.radiogmusic.com/rock.m3u");
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~w~buffering ~p~radio rock music~w~...", 1500, 3);
    return 1;
}
//--------------------------------------------------------------------------------------------------------------------------------
CMD:radiodubstep(playerid)
{
    PlayAudioStreamForPlayer(playerid, "http://s4.radiohost.pl:8154/listen.pls");
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~w~buffering ~p~radio dubstep~w~...", 1500, 3);
    return 1;
}
//--------------------------------------------------------------------------------------------------------------------------------
CMD:kissfm(playerid)
{
    PlayAudioStreamForPlayer(playerid, "http://80.86.106.136/listen.pls");
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~w~buffering ~p~kiss fm~w~...", 1500, 3);
    return 1;
}
//--------------------------------------------------------------------------------------------------------------------------------
CMD:taraf(playerid)
{
    PlayAudioStreamForPlayer(playerid, "http://radiotaraf.no-ip.biz:7100");
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~w~buffering ~p~radio taraf~w~...", 1500, 3);
    return 1;
}
You need a .pls or .m3u extension, otherwise it will not work with PlayAudioStreamForPlayer.