#1

Why it doesn't work? I need explanation, Thank you.

pawn Код:
CMD:streamaudio(playerid, params[])
{
    new string[128];
    if(sscanf(params, "s[256]", params)) return SendClientMessage(playerid, -1,"{FF8000}ERROR{FFFFFF}: /stream [url]");
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{AA3333}You are not an RCON Admin.");
    format(string, sizeof(string), "An admin has started global song.[ /stopmusic to stop listening ]");
    SendClientMessageToAll( 0xFFFF00AA, string);
    foreach(Player, i)
    {
        PlayAudioStreamForPlayer(i, params);
    }
    return 1;
}
It's not abour URL isn't working.. when I type '/streamaudio .' it never displays any green text saying. 'Streaming:.' I don' know why!
Reply
#2

Maybe your song's URL is not streamed..?
Reply
#3

Quote:
Originally Posted by Zamora
Посмотреть сообщение
Maybe your song's URL is not streamed..?
It's not abour URL isn't working.. when I type '/streamaudio .' it never displays any green text saying. 'Streaming:.' I don' know why!
Reply
#4

Let's check the error by debugging
pawn Код:
CMD:streamaudio(playerid, params[])
{
    new string[128];
    if(sscanf(params, "s[256]", params)) return SendClientMessage(playerid, -1,"{FF8000}ERROR{FFFFFF}: /stream [url]");
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{AA3333}You are not an RCON Admin.");
    format(string, sizeof(string), "An admin has started global song.[ /stopmusic to stop listening ]");
    SendClientMessageToAll( 0xFFFF00AA, string);
    foreach(Player, i)
    {
        PlayAudioStreamForPlayer(i, params);
    }
    printf("-Audio debug: %s",params);//this will show or help us to find the error
    return 1;
}
And show me the server console logs after using this command

EDIT : I think test it for you now , and working fine for me , make sure that your url are working fine.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)