Using PlayAudioStreamForPlayer in OnPlayerConnect makes players crash
#1

Hello dear sa-mp developers. I found out, that using PlayAudioStreamForPlayer in a OnPlayerConnect public function makes players crash or lag when they connect to the server. I don't know, if it depend on the link that i use or not, but does anyone else have such problem? Thank you. IF needed, here is the exact code i use:PlayAudioStreamForPlayer(playerid, "https://dl.dropbox.com/s/22hsn12bxgn8b9e/welcome.wav?dl=1"); this have been working in 0.3e version! And it doesn't matter that link doesn't end at .wav
Reply
#2

Quote:
Originally Posted by pasha97
Посмотреть сообщение
Hello dear sa-mp developers. I found out, that using PlayAudioStreamForPlayer in a OnPlayerConnect public function makes players crash or lag when they connect to the server. I don't know, if it depend on the link that i use or not, but does anyone else have such problem? Thank you. IF needed, here is the exact code i use:PlayAudioStreamForPlayer(playerid, "https://dl.dropbox.com/s/22hsn12bxgn8b9e/welcome.wav?dl=1"); this have been working in 0.3e version! And it doesn't matter that link doesn't end at .wav
The bug is only for you...
Код:
PlayAudioStreamForPlayer(playerid, "http://icecast.clickfm.co.il:8002/click2dance");
Working
Reply
#3

Quote:
Originally Posted by Swimor
Посмотреть сообщение
The bug is only for you...
Код:
PlayAudioStreamForPlayer(playerid, "http://icecast.clickfm.co.il:8002/click2dance");
Working
?
Reply
#4

PlayAudioStreamForPlayer(playerid, url[]);
works fine...

Seems that you have made a mistake.
Furthermore the music files have to be mp3-file. Maybe this could fix your bug.
Reply
#5

Quote:
Originally Posted by Nanory
Посмотреть сообщение
Furthermore the music files have to be mp3-file. Maybe this could fix your bug.
Also, it can be because of the server you are hosting the file on. If the server is acting slow, the client will have to wait longer to get the audio file and then play it.
Reply
#6

We've been using PlayAudioStreamForPlayer in OnPlayerConnect for many months on Las Venturas Playground and nobody has experienced any issues that I've been made aware of so I don't think this issue is directly related to the callback.
Reply
#7

Just tested under 03x, used PlayAudioStreamForPlayer as the first function under OnPlayerConnect. Everything went well, no crashes.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)