PlayAudioStreamForPlayer Help - 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: PlayAudioStreamForPlayer Help (
/showthread.php?tid=394285)
PlayAudioStreamForPlayer Help -
KingyKings - 21.11.2012
Hi,
I want it so when the player goes near a point it will automatically play the music..
I put this under OnPlayerConnect but it just plays it where ever the player is.
Quote:
PlayAudioStreamForPlayer(playerid, "PlayAudioStreamForPlayer(playerid, "http://lackofstyle.com/mp3s/bing_lookalotlikexmas.mp3",1478.8761,-1666.3502,14.5532, 50.0, 0);",1478.8761,-1666.3502,14.5532, 50.0, 0);
|
Hmm, i know clearly im doing something wrong because it wouldn't make sense anyway in the script.
But can you help me? I would much appritiate it!
Re: PlayAudioStreamForPlayer Help -
ScRaT - 21.11.2012
You should read the wiki...
https://sampwiki.blast.hk/wiki/PlayAudioStreamForPlayer
pawn Code:
PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls", X, Y, Z, Distance, 1);
with...
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Use it OnPlayerUpdate or with a timer.
Good Luck!
Re: PlayAudioStreamForPlayer Help -
_chimera_ - 22.11.2012
try this I have not tested
Quote:
public OnPlayerUpdate(playerid)
{
If(GetPlayerPos(playerid ,x,y,z) PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls");
return 1;
}
|
Re: PlayAudioStreamForPlayer Help -
-=Dar[K]Lord=- - 22.11.2012
Quote:
Originally Posted by _chimera_
try this I have not tested
|
You are quite near otherwise you can also use IsPlayerInTheRangeOfPoint(playerid,...
Re: PlayAudioStreamForPlayer Help -
_chimera_ - 22.11.2012
Quote:
Originally Posted by -=Dar[K]Lord=-
You are quite near otherwise you can also use IsPlayerInTheRangeOfPoint(playerid,...
|
I never used that function ..