SetSoundMaxDistance: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(created)
(No difference)

Revision as of 10:20, 8 February 2009

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:

Returns

Returns a true if the max distance was set, false otherwise.

Example

Click to collapse [-]
Client
local sound = playSound3D("sounds/song.mp3", 373.14, -125.21, 1001, true)

function maxdistanceFunc(command, param)
  setSoundMaxDistance(sound, tonumber(param))
end
addCommandHandler("setmaxdistance", maxdistanceFunc)

See Also

Shared