PlayAudioStream within range. - 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: PlayAudioStream within range. (
/showthread.php?tid=654576)
PlayAudioStream within range. -
HankJames - 01.06.2018
Hey guys, it'd be great if one of you could help me in making this; I managed to play audio stream within range, but the problem is that if I leave that area the song still continues. Here's what I used to play audio stream within a range.
- I want that if my virtual world changes or if I leave that area the song should stop automatically.
Код:
new interior, world;
interior = GetPlayerInterior(playerid);
world = GetPlayerVirtualWorld(playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i))
if(GetPlayerInterior(i) == interior)
if(GetPlayerVirtualWorld(i) == world)
if(IsPlayerInRangeOfPoint(i, 20.0, -2648.0227,1396.0142,906.4609))
PlayAudioStreamForPlayer(i, http://************/HankJames6);
Thanks in advance.
Re: PlayAudioStream within range. -
iSpark - 01.06.2018
Re: PlayAudioStream within range. -
1221JJ - 01.06.2018
Lol fixed it thanks!