HU/setSoundProperties

From Multi Theft Auto: Wiki
Revision as of 12:36, 22 July 2018 by Surge (talk | contribs)
Jump to navigation Jump to search

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

Szintaxis

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


Kötelező argumentumok

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

Visszaadott érték

Returns true if the properties sucessfully set, false otherwise.

Példa

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

Lásd még

Fordította

Surge