29.06.2014, 09:00
Код:
SendAudioToRange(audioid, volume, Float:x, Float:y, Float:z, Float:range)//4462 { if(audiohandleglobal >= 99) { audiohandleglobal = 0; } else { audiohandleglobal++; } foreach(Player, i) { if(IsPlayerConnected(i)) { if(Audio_IsClientConnected(i)) { if(IsPlayerInRangeOfPoint(i,range,x,y,z)) { new localhandle = Audio_Play(i,audioid,false,false,false); Audio_Set3DPosition(i, localhandle, x, y, z, range); Audio_SetVolume(i, localhandle, volume); audiohandle[i][audiohandleglobal] = localhandle; } } } } return audiohandleglobal; }
Код:
stock SendAudioURLToRange(url[], volume, Float:x, Float:y, Float:z, Float:range) //4492 { if(audiohandleglobal >= 99) { audiohandleglobal = 0; } else { audiohandleglobal++; } foreach(Player, i) { if(IsPlayerConnected(i)) { if(Audio_IsClientConnected(i)) { if(IsPlayerInRangeOfPoint(i,range,x,y,z)) { new localhandle = Audio_PlayStreamed(i,url,false,false,false); Audio_Set3DPosition(i, localhandle, x, y, z, range); Audio_SetVolume(i, localhandle, volume); audiohandle[i][audiohandleglobal] = localhandle; } } } } return audiohandleglobal; }