Stream, for all - 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: Stream, for all (
/showthread.php?tid=457316)
Stream, for all -
cray1100 - 11.08.2013
I have a system, that you can stream for a player, but i want to stream for everyone in one command... And only for admins, specifically rcon... I was wondering if i could set the pos on PlayAudioStreamForPlayer To the middle of the map, then set the radius to like 10000... Or maybe stream it on each player with foreach(when i tried to do this myself with foreach, if a player did /stopmusic, it would stop his audio, but he still heard everybodies...)
Re: Stream, for all -
Chenko - 11.08.2013
The distance parameters are optional so all you have to do is use foreach and don't include coordinates.
Ex:
Код:
foreach(Player, i)
{
PlayAudioStreamForPlayer(playerid, "url");
}
Re: Stream, for all -
cray1100 - 11.08.2013
Thats what i had... When i set it up with foreach, DOESNT WORK...
Re: Stream, for all -
PT - 11.08.2013
try this way
pawn Код:
foreach(Player, i)
{
PlayAudioStreamForPlayer(i, "url");
}
// or
for(new i = 0; i <MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, "url");
}
Re: Stream, for all -
cray1100 - 12.08.2013
didnt work