Audio Streaming, for all...
#1

Well, you see... I have two problems... One in which is not a major problem, but the other one is...

First: The looped message... For example, Using this, works, but in game, it sends the "Audio stream:" message many times... Can it be fixed?

pawn Код:
stock PlayStreamForAll(params[])
{
    foreach (new i : Player)
    {
        StopAudioStreamForPlayer(i);
        PlayAudioStreamForPlayer(i, params);
    }
    return 1;
}
Second: With the same code above... In-Game, when the code is executed, it streams the music, and the music echos... Because it is being played for (the number of players) times... Can this be fixed?
Reply
#2

Bump*
Reply
#3

Bump*
Reply
#4

Bump*

(Will someone please reply?)
Reply
#5

Why wont anyone answer this thread... :/
Reply
#6

pawn Код:
stock PlayStreamForAll(const params[])
{
    foreach (Player, i) PlayAudioStreamForPlayer(i, params);
    return 1;
}
Why did you want to stop stream after?
The audio stream message can't be disabled by server function. You can disable it by typing /audiomsg.
Reply
#7

Try This
pawn Код:
stock PlayStreamForAll(params[]){
    foreach (Player, i) return PlayAudioStreamForPlayer(i, params);
    return 1;
}
If you do have a new foreach, there's a new function, like what I have above thew new i : player is an old foreach function

PS: Sorry if i made any mistakes I'm at school
Reply
#8

Quote:
Originally Posted by pds2012
Посмотреть сообщение
Try This
pawn Код:
stock PlayStreamForAll()//you don't need any playerid or params in here since it's looped
{
    foreach (Player, i) return PlayAudioStreamForPlayer(i, params);
    return 1;
}
If you do have a new foreach, there's a new function, like what I have above thew new i : player is an old foreach function

PS: Sorry if i made any mistakes I'm at school
Your code will display error because ,,params" variable isn't defined...
Reply
#9

Quote:
Originally Posted by QuaTTrO
Посмотреть сообщение
Your code will display error because ,,params" variable isn't defined...
My Mistake, I didn't notice that there is a function that needed params
as I said lately I'm in school, that's why I'm abit fast :P, if I get caught you know what's going to happen
Sorry once again
Reply
#10

pawn Код:
stock PlayStreamForAllPlayers(link[])
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        PlayerAudioStreamForPlayer(i,link);
    }
}
try that...

Or if you want it more detail

pawn Код:
stock PlayStreamForAllPlayers(link[], Float:X = 0.0, Float:Y = 0.0, Float:Z = 0.0, Float:distance = 50.0, usepos = 0)
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        PlayAudioStreamForPlayer(i, link, X, Y, Z, distance, usepot);
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)