Music isn't working
#1

So guys I have a problem. I am streaming music in my server. Everything works fine for me. But I tested it with my friends. They have their radio volume enabled and everything. They also get the stream audio message. But they don't hear the music. Then we tested it on my friend's server. But now he only hears the music and we don't. So I think the problem here is that only the host can hear the music. And yes we tried everything. We even switched with playerids etc. We spent more than 3 hours with trying to figure out what the problem is. But no luck. Anybody knows something about this problem?

EDIT:

Guys just to clarify... Everything is working fine. Because why else would the host hear the music? If the host can hear the music it means that it's working or am I wrong? So just to make sure:
  • The script is working.
  • The radio volume of all players who are connected, are enabled.
  • We tested it several times with switching between ID's, with switching from servers etc.
  • We have tried several links. We even tried dropbox, kiwi etc.
Guys I think it's not the script itself, but more the function that is called "PlayAudioStreamForPlayer". I think there is something wrong with this function or anything? I mean does anybody has this problem also?
Reply
#2

Are you sure you send it to all playerids on the server and not just a specific one. Been a long time since I was learning and hopefully someone corrects me if I'm wrong but don't yoou have to create a loop to check all the connected playerids and send the stream to all?
Reply
#3

Quote:
Originally Posted by MarikAshtar
Посмотреть сообщение
Are you sure you send it to all playerids on the server and not just a specific one. Been a long time since I was learning and hopefully someone corrects me if I'm wrong but don't yoou have to create a loop to check all the connected playerids and send the stream to all?
Yes we are looping it for all players(without break).
Reply
#4

Can you post some code?
Reply
#5

pawn Код:
//Loop
  for(new i=0; i <= GetPlayers; i++)
  {
      if(IsPlayerConnected(i))
   {
       PlayAudioStreamForPlayer(i, url);
   }
  }
Reply
#6

Can you show the command/w,e you use to start the audio
Reply
#7

Check your url
Reply
#8

Quote:
Originally Posted by MarikAshtar
Посмотреть сообщение
Can you show the command/w,e you use to start the audio
PlayAudioStreamForPlayer(i, url);

...

The command is working because the host can hear the music when he uses the command. And we get the notification that the music is streaming.

Quote:
Originally Posted by Amunra
Посмотреть сообщение
Check your url
The url is working. Because the player who hosts the server can hear the music. The problem is that other players in the server can't hear the music.
Reply
#9

not all links work for audiostream. I will recommend u to use kiwi6.com
Upload a music there and get the hotlink. Paste it there and it will work
Reply
#10

PHP код:
for(new i=0;i<MAX_PLAYERS;i++)
{
    if(
IsPlayerConnected(i))
    {
        
PlayAudioStreamForPlayer(i,url);
    }
}
//Try This 
Maybe Your Loop is Error !
So Try This ..

Correct me If I Wrong
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)