[AJUDA] radio
#1

Galera, eu consigo ouvir o som, mas os outros player nгo conseguem, alguйm sabe o pq?

pawn Код:
if(dialogid == 995)
    {
        new Float:X, Float:Y, Float:Z, Float:Distance = 25.0;
        GetPlayerPos(playerid, X, Y, Z);
        if(response)
        {
            if(listitem == 0)// Musica teste
            {//
               StopAudioStreamForPlayer(playerid);
               PlayAudioStreamForPlayer(playerid, "http://deltac0.com/m/rick.mp3", X, Y, Z, Distance, 1);
            }
        }
    }
Reply
#2

pawn Код:
if(dialogid == 995)
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            new Float:X, Float:Y, Float:Z, Float:Distance = 25.0;
            GetPlayerPos(i, X, Y, Z);
            if(response)
            {
                if(listitem == 0)// Musica teste
                {
                   StopAudioStreamForPlayer(i);
                   PlayAudioStreamForPlayer(i, "http://deltac0.com/m/rick.mp3", X, Y, Z, Distance, 1);
                }
            }
        }
    }
}
Reply
#3

Vlw, tenho que estudar e usar MAX_PLAYERS =D
+rep
Reply
#4

Desculpe o double, mas como faзo para que quando o player deslogue o audio pare?
Jб tentei colocar no OnPlayerDisconect
StopAudioStreamForPlayer(i);

mas nao deu
Reply
#5

pawn Код:
StopAudioStreamForPlayer(playerid); // OnPlayerDisconnect
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)