HELP[REP+]
#9

Код:
cmd(stream, playerid, params[])
{
    if(Account[playerid][Dj] == 1)
    {
        new url[60];
        if(sscanf(params, "s[60]", url)) return SendClientMessage(playerid, -1, "Usage: /stream [URL]");
        if(Account[playerid][Streaming] == 0) return SendClientMessage(playerid, -1, "{FF9900}Error: You must turn on your streaming mode!");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
        	if(Account[i][Streaming] == 1)
        	{
   			SendClientMessageToAll(-1, "=========================================");
       			StopAudioStreamForPlayer(i);
        		PlayAudioStreamForPlayer(i, url);
        		SendClientMessageToAll(-1, "=========================================");
        	}
        }
        return 1;
    }
    else return 0;
}
Should work.

The fix: You had a useless variable string which had it's length as MAX_PLAYERS? also your url variable was [MAX_PLAYERS] and in sscanf params it was [500]? Changed these.

Test the audio with this URL: http://somafm.com/tags.pls
Reply


Messages In This Thread
HELP[REP+] - by dh240473 - 06.10.2015, 07:44
Re: HELP[REP+] - by jihadmeneer - 06.10.2015, 07:46
Re: HELP[REP+] - by jlalt - 06.10.2015, 07:52
Re: HELP[REP+] - by dh240473 - 06.10.2015, 08:01
Re: HELP[REP+] - by dh240473 - 06.10.2015, 08:15
Re: HELP[REP+] - by jihadmeneer - 06.10.2015, 08:31
Re: HELP[REP+] - by dh240473 - 06.10.2015, 08:33
Re: HELP[REP+] - by Galletziz - 06.10.2015, 08:44
Re: HELP[REP+] - by Affan - 06.10.2015, 09:01
Re: HELP[REP+] - by dh240473 - 06.10.2015, 10:16

Forum Jump:


Users browsing this thread: 1 Guest(s)