Audio Stream Help
#1

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;
}
Reply
#2

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;
}
Reply
#3

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]
Reply
#4

tell me the link, that you want to play
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)