RO/getSoundMaxDistance

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.

Obține distanța maximă de redare a unui sound fără ca acesta să fie oprit.

Sintaxă

int getSoundMaxDistance (element sound)

OOP Syntax Help! I don't understand this!

Method: sound:getMaxDistance(...)
Variable: .maxDistance
Counterpart: setSoundMaxDistance


Argumente Necesare

  • sound: un element de tip sound.

Redare

Redă un integer a distanței maxime, false dacă au fost trimise argumente nevalide.

Exemplu

Acest exemplu obține distanța maximă de redare a sunetului specificat atunci când jucătorul tastează comanda /getmaxdistance.

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

function getmaxdistanceFunc()
    outputChatBox("Distanță maximă: " .. getSoundMaxDistance(sound))
end
addCommandHandler("getmaxdistance", getmaxdistanceFunc)

Vizualizați de asemenea