GetSoundPan

From Multi Theft Auto: Wiki
Revision as of 21:07, 19 December 2013 by SDraw (talk | contribs) (Created page with "__NOTOC__ {{Client function}} This function is used to get the pan level of the specified sound element. ==Syntax== <syntaxhighlight lang="lua">float getSoundPan ( element theSound )</co...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function is used to get the pan level of the specified sound element.

Syntax

float getSoundPan ( element theSound )

Required Arguments

  • theSound: The sound element which pan you want to modify.

Returns

Returns float value with range from -1.0 (left) to 1.0 (right), false otherwise.

Example

Click to collapse [-]
Client
function playMusic ()
        local song = playSound('song.mp3')
        setSoundPan(song, 0.3)
        outputChatBox("Current pan is "..tostring(getSoundPan(song)))
end

addCommandHandler("music", playMusic)

See Also