/music help
#2

pawn Код:
CMD:music(playerid, params[])
{
    if(!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid, COLOR_RED, "You cannot use this command");
        return 1;
    }
    else
    {
        new string[128], url[128];
        if(sscanf(params, "s[256]", url)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /music [url]");
        if(!strcmp(url, "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 (new i : Player)
        {
            PlayAudioStreamForPlayer(i, url);
        }
    }
    return 1;
}
Didn't tested it! But try anyway!
Reply


Messages In This Thread
/music help - by nogh445 - 12.08.2012, 05:12
Re: /music help - by RedJohn - 12.08.2012, 08:48

Forum Jump:


Users browsing this thread: 1 Guest(s)