SA-MP Forums Archive
sound problem. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: sound problem. (/showthread.php?tid=331031)



sound problem. - oscar7610 - 03.04.2012

I only hear the sound when player connect others wont.

public OnPlayerConnect(playerid)
{

SendClientMessage(playerid,0xFFFF00AA,"Use /stopmusic to stop the music");
TogglePlayerClock(playerid, 0); // Show the clock
SetPlayerColor(playerid,0xFFFFFFAA);
PlayAudioStreamForPlayer(playerid, "http://k004.kiwi6.com/hotlink/96jz2pcdwx/ddd.mp3");
return 1;
}


Re: sound problem. - Cjgogo - 03.04.2012

You mean only ID 0 hears the song?


Re: sound problem. - Reklez - 03.04.2012

You want every time someone connects the sound will be hear by everyone even they are spawned?
if you say so loop it something like this

pawn Код:
for(new i; i<MAX_PLAYERS;i++)
{
    if(IsPlayerConnected(i))
    {
       PlayAudioStreamForPlayer(i, "http://k004.kiwi6.com/hotlink/96jz2pcdwx/ddd.mp3");
    }
}



Re: sound problem. - Cjgogo - 03.04.2012

I think he wants only players that are on connecting stage to hear sound


Re: sound problem. - Reklez - 03.04.2012

Quote:
Originally Posted by Cjgogo
Посмотреть сообщение
I think he wants only players that are on connecting stage to hear sound
Quote:
Originally Posted by oscar7610
Посмотреть сообщение
I only hear the sound when player connect others wont.
it is clear to you? he wants to make all players hear the sound.


Re: sound problem. - oscar7610 - 03.04.2012

yes all players


Re: sound problem. - oscar7610 - 03.04.2012

I want all players to hear this sound how can I make it? please when they connect but when they spawn the music stops or /stopmusic to stop. I can hear the music but others not


Re: sound problem. - oscar7610 - 04.04.2012

someone pls?