SA-MP Forums Archive
Radio steam ingame.. [REP+] - 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: Radio steam ingame.. [REP+] (/showthread.php?tid=349094)



Radio steam ingame.. [REP+] - Wackerly - 07.06.2012

How can I add any radio I want if it is .pls and.. when they do /radiostation (example) it plays from that radio I have linked to? REP will be given for the first one as post a code as work great!


Re: Radio steam ingame.. [REP+] - sniperwars - 07.06.2012

ZCMD:

pawn Код:
CMD:exampleradio(playerid, params[])
{
     PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1354805"); //Radio Paradise//
     return 1;
}
pawn Код:
COMMAND:exampleradio(playerid, params[])
{
     PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1354805"); //Radio Paradise//
     return 1;
DCMD:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
     dcmd(exampleradio, 12);
     return 0;
}

dcmd_exampleradio(playerid, params[])
{
     #pragma unused params
     PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1354805"); //Radio Paradise//
     return 1;
}
STRCMP:

pawn Код:
if(strcmp(cmdtext, "/exampleradio", true, 11) == 0)
{
     PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1354805"); //Radio Paradise//
     return 1;
}