PlayerPLaySound
#1

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;
}
Reply
#2

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;
}
Reply
#3

But the closest players don't listen nothing....
Reply
#4

Quote:
Originally Posted by SnL
Посмотреть сообщение
But the closest players don't listen nothing....
They do for me.
Reply
#5

could you give me your code umm maybe it's the same but could you give me it?
Reply
#6

Players within that range might not hear the sound depending on the soundid. Set the PlayerPlaySound coords to 0, 0, 0.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)