SA-MP Forums Archive
PlaySoundForPlayersInRange() - 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: PlaySoundForPlayersInRange() (/showthread.php?tid=283300)



PlaySoundForPlayersInRange() - Andrejs - 14.09.2011

In the FS ls_elevator i found that:
Код:
#include "../include/gl_common.inc" // for PlaySoundForPlayersInRange()
but in gl_common.inc I didn't found any PlaySoundForPlayersInRange() so where I can find that function?


Re: PlaySoundForPlayersInRange() - mmrk - 14.09.2011

Location: include/gl_common.inc - SA-MP 0.3d RC1
pawn Код:
stock PlaySoundForPlayersInRange(soundid, Float:range, Float:x, Float:y, Float:z)
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i,range,x,y,z))
        {
            PlayerPlaySound(i, soundid, x, y, z);
        }
    }
}



Re: PlaySoundForPlayersInRange() - Andrejs - 14.09.2011

Thanks a lot.
Don't know why, but even in SA-MP 0.3d RC1 in include/gl_common.inc I don't have this function >_<