Music isn't working -
Mistermaru - 25.01.2016
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?
Re: Music isn't working -
MarikAshtar - 25.01.2016
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?
Re: Music isn't working -
Mistermaru - 25.01.2016
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).
Re: Music isn't working -
MarikAshtar - 25.01.2016
Can you post some code?
Re: Music isn't working -
Mistermaru - 25.01.2016
pawn Код:
//Loop
for(new i=0; i <= GetPlayers; i++)
{
if(IsPlayerConnected(i))
{
PlayAudioStreamForPlayer(i, url);
}
}
Re: Music isn't working -
MarikAshtar - 25.01.2016
Can you show the command/w,e you use to start the audio
Re: Music isn't working -
Amunra - 25.01.2016
Check your url
Re: Music isn't working -
Mistermaru - 25.01.2016
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.
Re: Music isn't working -
JamalMaddox - 25.01.2016
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
Re: Music isn't working -
Amunra - 25.01.2016
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