Song for all
#5

Код:
stock PlayAudioStreamForAll(url[])
{
    for(new i; i<GetMaxPlayers(); i++)
    {
        if(IsPlayerConnected( i ))
        {
            PlayAudioStreamForPlayer(i, url, x, y, z, distance);
        }
    }
    return 1;
   
}
stock StopAudioStreamForAll(url[])
{
    for(new i; i<GetMaxPlayers(); i++)
    {
        if(IsPlayerConnected( i ))
        {
             StopAudioStreamForPlayer(playerid);
        }
    }
    return 1;
   
}
YCMD:stopmusic(playerid, params[], help)
{
#pragma unused params
    if (help)
    {
        SendClientMessage(playerid, 0xFF0000AA, "Stops audio for everyone.");
    }
    else
    {
        new
            str[32];
        if (isnull(params))
        {
            format(str, sizeof (str), "Usage: \"/stopmusic\"";
            SendClientMessage(playerid, 0xFF0000AA, str);
        }
        else
        {
            StopAudioStreamForPlayer(playerid);
        }
    }
    return 1;
}
YCMD:music(playerid, params[], help)
{
    if (help)
    {
        SendClientMessage(playerid, 0xFF0000AA, "Plays audio for everyone.");
    }
    else
    {
        new
            str[32];
        if (isnull(params))
        {
            format(str, sizeof (str), "Usage: \"/music [url]\"";
            SendClientMessage(playerid, 0xFF0000AA, str);
        }
        else
        {
            PlayAudioStreamForAll(params);
        }
    }
    return 1;
}
Here is what i use, ycmd
Reply


Messages In This Thread
Song for all - by Vizi - 17.08.2012, 12:30
Re: Song for all - by Youice - 17.08.2012, 12:34
Re: Song for all - by RanSEE - 17.08.2012, 12:40
Re: Song for all - by Vizi - 17.08.2012, 12:43
Re: Song for all - by RanSEE - 17.08.2012, 12:49

Forum Jump:


Users browsing this thread: 2 Guest(s)