PlayStreamForAll
#7

Quote:
Originally Posted by PT
Посмотреть сообщение
I think is this you want...

i don't test if this code :S

pawn Код:
stock PlayStreamForAll(link[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        StopAudioStreamForPlayer(i);
        PlayAudioStreamForPlayer(i, link)
    }
    print("[AdmCmd]: Admin Is Streaming Music Globally.");
    return 1;
}

if(strcmp(cmd, "/stream", true) == 0)
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        new link[128];
        if(sscanf(cmdtext, "s[128]", cmd, link))
        {
            SendClientMessage(playerid, COLOR_GREY,"USAGE: /stream <link>");
            return 1;
        }
        PlayStreamForAll(link);
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY,"   You are not authorized to use that command !");
    }
    return 1;
}

if(strcmp(cmd, "/stopstream", true) == 0)
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            StopAudioStreamForPlayer(i);
        }
    }
    return 1;
}
this uses SSCANF by ******
Well, what about stock PlayStreamForAll(link[]) ?
Do it that way:
Код:
stock PlayStreamForAll(link[])
{
    foreach(Player, i)
    //foreach(new i : Player)
    {
        StopAudioStreamForPlayer(i);
        PlayAudioStreamForPlayer(i, link);
    }
    return 1;
}
Cause this way shows me just Audio stream: <noting here>
Reply


Messages In This Thread
PlayStreamForAll - by maxpain43 - 25.07.2013, 10:51
Respuesta: PlayStreamForAll - by Xabi - 25.07.2013, 11:07
Re: Respuesta: PlayStreamForAll - by maxpain43 - 25.07.2013, 11:32
Respuesta: PlayStreamForAll - by Xabi - 25.07.2013, 13:26
Re: Respuesta: PlayStreamForAll - by maxpain43 - 25.07.2013, 23:47
Re: PlayStreamForAll - by PT - 26.07.2013, 02:56
Re: PlayStreamForAll - by maxpain43 - 26.07.2013, 03:34
Re: PlayStreamForAll - by maxpain43 - 26.07.2013, 15:06
Re: PlayStreamForAll - by PT - 26.07.2013, 16:55
Re: PlayStreamForAll - by maxpain43 - 26.07.2013, 17:37

Forum Jump:


Users browsing this thread: 1 Guest(s)