SA-MP Forums Archive
cmd for audistream all players - 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: cmd for audistream all players (/showthread.php?tid=369804)



cmd for audistream all players - Vizi - 18.08.2012

how to make a command with audio stream for all players ??
i know for one player but for all?


Re: cmd for audistream all players - RanSEE - 18.08.2012

pawn Код:
//everyone.
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
StopAudioStreamForPlayer(i);
PlayAudioStreamForPlayer(i, "the fakin link here");
}
}
//people nearby.
new Float:Pos[3];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i,RANGE,Pos[0],Pos[1],Pos[2]))
{
StopAudioStreamForPlayer(i);
PlayAudioStreamForPlayer(i, "the fakin link here");
}
}
}