Audio Help.
#1

This is the code And I get no errors but it doesn't play the URL I put in. The URL is a .mp3 url

pawn Код:
CMD:music(playerid, params[])
{
    if(!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid, COLOR_RED, "You cannot use this command");
        return 1;
    }
    else
    {
        new string[128];
        if(sscanf(params, "s[256]", params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /music [url]");
        if(!strcmp(params, "stop", true, 4))
        {
            StopAudioStreamForPlayer(playerid);
            SendClientMessage(playerid, COLOR_RED, " You have stopped listening to music.");
            return 1;
        }

        format(string, sizeof(string), "An Admin Has Started A Song. Use '/music stop' to stop the song");
        SendClientMessageToAll(COLOR_ORANGE, string);
        foreach(Player, i)
        {
            PlayAudioStreamForPlayer(i, params);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Audio Help. - by nogh445 - 12.08.2012, 00:45
Re: Audio Help. - by Kindred - 12.08.2012, 00:57
Re: Audio Help. - by nogh445 - 12.08.2012, 01:02
Re: Audio Help. - by Kindred - 12.08.2012, 01:09
Re: Audio Help. - by nogh445 - 12.08.2012, 01:10
Re: Audio Help. - by Kindred - 12.08.2012, 01:21
Re: Audio Help. - by nogh445 - 12.08.2012, 01:34

Forum Jump:


Users browsing this thread: 1 Guest(s)