SA-MP Forums Archive
Question about XYZ in PlayerPlaySound - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Question about XYZ in PlayerPlaySound (/showthread.php?tid=192095)



Question about XYZ in PlayerPlaySound - Jochemd - 21.11.2010

Hello,

I got a noobisch question, what a shame, but whatever...

pawn Код:
PlayerPlaySound(playerid,soundid,X,Y,Z);
The wiki says the X Y Z is the X Y Z World, but that doesnt say anything to me, I do not understand what these X Y Z do in this functions.. I know that 0 0 0 just plays it but why are the X Y Z needed?

Regards, Jochem


Re: Question about XYZ in PlayerPlaySound - Danny - 21.11.2010

With the XYZ coords can you determine on what position you can hear the sound.

And yea, in my opinion, that are some pretty useless params.

So:

Код:
new Float:sX,Float:sY,Float:sZ;
GetPlayerPos(playerid, sX, sY, sZ);
PlayerPlaySound(playerid, 1337, sX, sY, sZ);



Re: Question about XYZ in PlayerPlaySound - Jochemd - 21.11.2010

You mean: if you set the coцrdinates to some more far away, you will hear it from that position and with a lower volume?


Re: Question about XYZ in PlayerPlaySound - Danny - 21.11.2010

Yes and No, if you set it to a postition near the player, he will hear it with a lower volume.
But if you choose a position to far away, you will simply hear nothing.