SA-MP Forums Archive
radio problem (+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 problem (+rep) (/showthread.php?tid=373696)



radio problem (+rep) - peterory - 31.08.2012

how to use
PlayAudioStreamForPlayer
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/play radio", cmdtext, true) == 0) 
    {
        PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls");
        return 1;
    }
    if (strcmp("/radio in my pos", cmdtext, true) == 0)
    {
        new Float:X, Float:Y, Float:Z, Float:Distance = 5.0;
        GetPlayerPos(playerid, X, Y, Z);
	PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls", X, Y, Z, Distance, 1);
	return 1;
    }
    return 0;
}
i saw this in wiki
but how to playmusic use mp3?


Re: radio problem (+rep) - [HK]Ryder[AN] - 31.08.2012

To use a mp3 you need a direct link to it...for example http://www.somesite.com/somesong.mp3

then in pawn type
pawn Код:
PlayAudioStreamForPlayer(playerid, "http://www.somesite.com/somesong.mp3");



Re: radio problem (+rep) - peterory - 31.08.2012

Quote:
Originally Posted by [HK]Ryder[AN]
Посмотреть сообщение
To use a mp3 you need a direct link to it...for example http://www.somesite.com/somesong.mp3

then in pawn type
pawn Код:
PlayAudioStreamForPlayer(playerid, "http://www.somesite.com/somesong.mp3");
thx! have been +rep