DE/setSoundMaxDistance

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Setzt für ein Sound Element die maximale Reichweite, wo der Sound aufhört hörbar zu sein.

Syntax

bool setSoundMaxDistance ( element sound, int distanz )

OOP Syntax Hilfe! Ich verstehe das nicht!

Methode: sound:getMaxDistance(...)
Variable: .maxDistance
Gegenstück: getSoundMaxDistance

Benötigte Argumente

  • sound: ein Sound Element.
  • distanz: der Standardwert ist 20

Rückgabe

Gibt ein true zurück wenn die maximale Reichweite gesetzt wurde, false wenn nicht.

Beispiel

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)

Siehe auch