DE/stopSound

From Multi Theft Auto: Wiki
Revision as of 16:18, 17 February 2014 by Manfred Müller (talk | contribs) (Created page with "Stoppt den abgespielten Sound für das angegebene Sound-Element. Dabei wir das Sound-Element zerstört. ''' == Syntax == ''' <syntaxhighlight lang="lua">bool stopSound ( element derSound )</c...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Stoppt den abgespielten Sound für das angegebene Sound-Element. Dabei wir das Sound-Element zerstört.

Syntax

bool stopSound ( element derSound )

Benötigte Argumente

  • derSound: Das Sound Element was gestoppt werden soll.

Rückgaben

Gibt true zurück wenn erfolgreich, false wenn nicht.

Beispiel

Click to collapse [-]
Client
local sound

function starteSound ()
    sound = playSound( "beispiel.mp3", true )
end
addEventHandler( "onClientResourceStart", resourceRoot, starteSound )

function stopeSound ()
	stopSound ( sound )
end
addCommandHandler ("stopsound", stopeSound )