HU/setSoundProperties: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Client function hu}} {{New feature/item|3.0130|1.3.0|4097| This function edit's the properties of a specific sound. }} ==Syntax== <syntaxhighlight lang="lua...")
 
No edit summary
Line 2: Line 2:
{{Client function hu}}
{{Client function hu}}
{{New feature/item|3.0130|1.3.0|4097|
{{New feature/item|3.0130|1.3.0|4097|
This function edit's the properties of a specific [[sound]].
Ez a funkció módosítja egy adott [[sound|hang]] tulajdonságait.
}}
}}



Revision as of 12:33, 22 July 2018

Ez a funkció módosítja egy adott hang tulajdonságait.

Syntax

bool setSoundProperties(element sound, float fSampleRate, float fTempo, float fPitch, bool bReverse )

OOP Syntax Help! I don't understand this!

Method: sound:setProperties(...)
Counterpart: getSoundProperties


Required Arguments

  • bReverse: a boolean representing whether the sound will be reversed or not.

Returns

Returns true if the properties sucessfully set, false otherwise.

Example

Click to collapse [-]
Client
function editSongSound()
	local sound = playSound("song.wav", false) -- Play the file 'song.wav' and make it play only once
	setSoundProperties(sound, 48000.0, 128.00, 440.0, false) -- Set its samplerate to 48,000 Hz, tempo to 128.00, pitch to 440 Hz and not reversed
end
addEventHandler("onClientResourceStart", resourceRoot, editSongSound) -- Execute the function when the resource is started

See Also