SA-MP Forums Archive
Audio Stream Help - 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: Audio Stream Help (/showthread.php?tid=488505)



Audio Stream Help - sonushan - 18.01.2014

Hello Sir , I wanna stream a song to all players online but its not working. When I add URL then it says /playmusic [MP3] Link ], help please, here's the code


Код:
dcmd_playamusic(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 99999)
		{
 			for(new i = 0; i < MAX_PLAYERS; i++)
			{
	    		new link[200];
	    		if(sscanf(params,"s[200]",link)) return SendClientMessage(playerid,COLOR_RED,"Usage: /playamusic [MP3 Link]");
	    		PlayAudioStreamForPlayer(playerid, link);
	    		SendClientMessage(playerid, COLOR_WHITE,"An Admin has started playing music for every online player");
 			}
 		}
  	return 1;
}



Re: Audio Stream Help - ReD_HunTeR - 18.01.2014

try this:

Код:
dcmd_playmusica(playerid,params[])
{
    new link[128]; 
    if(PlayerInfo[playerid][pAdmin] >= 99999)
    {
       if(sscanf(params, "s[256]", link)) return SendClientMessage(playerid,COLOR_RED,"Usage: /playmusic [MP3 Link]");
       for(new i = 0; i < MAX_PLAYERS; i++)
       {
          PlayAudioStreamForPlayer(i, link);
       }
       SendClientMessage(playerid, COLOR_WHITE,"An Admin has started playing music for every online player");
    }
    return 1;
}



Re: Audio Stream Help - sonushan - 18.01.2014

Quote:
Originally Posted by BlackBomb
Посмотреть сообщение
try this:

Код:
dcmd_playmusica(playerid,params[])
{
    new link[128]; 
    if(PlayerInfo[playerid][pAdmin] >= 99999)
    {
       if(sscanf(params, "s[256]", link)) return SendClientMessage(playerid,COLOR_RED,"Usage: /playamusic [MP3 Link]");
       for(new i = 0; i < MAX_PLAYERS; i++)
       {
          PlayAudioStreamForPlayer(i, link);
       }
       SendClientMessage(playerid, COLOR_WHITE,"An Admin has started playing music for every online player");
    }
    return 1;
}
Still not working , when I add url it say Usage: /playamusic [MP3 Link]


Re: Audio Stream Help - ReD_HunTeR - 18.01.2014

tell me the link, that you want to play