AR/setSoundMaxDistance: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
|  (setSoundMaxDistance) | mNo edit summary | ||
| Line 26: | Line 26: | ||
| ==أنظر أيضاً== | ==أنظر أيضاً== | ||
| {{AR/Audio_functions}} | {{AR/Audio_functions}} | ||
| [[pt-br:setSoundMaxDistance]] | |||
Latest revision as of 02:00, 19 August 2021
Sets a custom sound max distance at which the sound stops.
Syntax
bool setSoundMaxDistance ( element sound, int distance )
Required Arguments
- sound: a sound element.
- distance: the default value for this is 10
Returns
Returns a true if the max distance was set, false otherwise.
Example
Click to collapse [-]
Clientlocal sound = playSound3D("sounds/song.mp3", 373.14, -125.21, 1001, true)
function maxdistanceFunc(command, param)
  setSoundMaxDistance(sound, tonumber(param))
end
addCommandHandler("setmaxdistance", maxdistanceFunc)
أنظر أيضاً
- getSoundBufferLength
- getSoundEffects
- getSoundFFTData
- getSoundLength
- getSoundLevelData
- getSoundMaxDistance