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)
+--- Thread: PlayerPLaySound (
/showthread.php?tid=491370)
PlayerPLaySound -
SnL - 30.01.2014
Is there any code like playnearsound?
i tried this but it doesn't work
pawn Код:
stock PlayNearSound(playerid,soundid)
{
new Float:p[3];
GetPlayerPos(playerid, p[0], p[1], p[2]);
for(new i; i < MAX_PLAYERS;i++)
{
if(IsPlayerInRangeOfPoint(i,7.0,p[0], p[1], p[2]))
PlayerPlaySound(i, soundid, p[0], p[1], p[2]);
}
return 1;
}
Re: PlayerPLaySound -
Jimmy0wns - 30.01.2014
It work's fine for me and my players, used the same function and did
pawn Код:
CMD:test(playerid, params[])
{
PlayNearSound(playerid,3200);
return 1;
}
Respuesta: PlayerPLaySound -
SnL - 30.01.2014
But the closest players don't listen nothing....
Re: Respuesta: PlayerPLaySound -
Jimmy0wns - 30.01.2014
Quote:
Originally Posted by SnL
But the closest players don't listen nothing....
|
They do for me.
Respuesta: PlayerPLaySound -
SnL - 30.01.2014
could you give me your code umm maybe it's the same but could you give me it?
Re: PlayerPLaySound -
Corekt - 30.01.2014
Players within that range might not hear the sound depending on the soundid. Set the PlayerPlaySound coords to 0, 0, 0.