07.10.2010, 15:16
you only need to put the co-ordinates of the player if you are changing them to create an ~offset~ sound effect. In that case you need to get their position, and use the co-ordinates. ( the offset is not in the same format as, say, holding objects)
eg
If you don't need to offset the sound, setting the co-ordinates to 0.0,0.0,0.0 will play the sound for the player to hear.
if you want to offset the sound
This is explained in the wiki as such, but the example they give is incorrect
eg
pawn Code:
PlayerPlaySound(playerid,1098,0.0,0.0,10.0); // will play the sound at 0,0,10 on the map
if you want to offset the sound
pawn Code:
new Float:px,Float:py,Float:pz;
GetPlayerPos(playerid,px,py,pz);
PlayPlayerSound(playerid,1098,px,py,pz+10); // will play the sound 10m above the player