17.12.2011, 01:00
pawn Code:
stock ProxAudio ( playerid, url [ ], Float:distance = 30.0 )
{
new Float:x,
Float:y,
Float:z;
new s = GetMaxPlayers ( );
GetPlayerPos ( playerid, x, y, z );
while ( s -- )
{
if ( IsPlayerConnected ( s ) && IsPlayerInRangeOfPoint ( s, distance, x, y, z ) )
{
PlayAudioStreamForPlayer ( s, url );
}
}
}