29.02.2012, 02:53
(
Last edited by Ballu Miaa; 29/02/2012 at 06:18 AM.
)
Quote:
[php]
for(new i = 0;i < MAX_PLAYERS; i++) { PlayAudioStreamForPlayer(i, "url"); } |
Btw the above code will play an audio stream for every player!
EDIT : I have a much better code
pawn Code:
for(new i = 0; i < MAX_PLAYERS; i++)//loops through all players
{
if(IsPlayerConnected(i))//checks if player is connected
{
StopAudioStreamForPlayer(i);//stops the audio stream if any is playing.If none is playing nothing will happen.
PlayAudioStreamForPlayer(i, "http://somafm.com/tags.pls");//plays the music.U can put any link.Just change somafm.com/tags.pls
}
}