24.04.2012, 12:16
normal loop version
foreach version
usepos note: 0 - will disable hearing through distance
1 - will enable hearing through distance
You use usepos 0 so that will not work i change it to 1 to make it work
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i,3.0,x,y,z))
PlayAudioStreamForPlayer(i,"http://k003.kiwi6.com/hotlink/5hg5uq0p9u/mange_makers_mange_bjuder_official_video.mp3",x,y,z,distance,1);
}
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
foreach(Player, i)
{
if(IsPlayerInRangeOfPoint(i,3.0,x,y,z))
PlayAudioStreamForPlayer(i,"http://k003.kiwi6.com/hotlink/5hg5uq0p9u/mange_makers_mange_bjuder_official_video.mp3",x,y,z,distance,1);
}
1 - will enable hearing through distance
You use usepos 0 so that will not work i change it to 1 to make it work

