ThePCGuy Posted January 26, 2013 Share Posted January 26, 2013 I have a function that is playing some music. It activates on command, but can you actually stop music from being played? Link to comment
mjau Posted January 26, 2013 Share Posted January 26, 2013 Uhm, just destroy the music element. Link to comment
GerardWay Posted January 26, 2013 Share Posted January 26, 2013 Post your script and I will add it. Link to comment
Moderators IIYAMA Posted January 26, 2013 Moderators Share Posted January 26, 2013 https://wiki.multitheftauto.com/wiki/PlaySound https://wiki.multitheftauto.com/wiki/StopSound Source: wiki_mta local sound --I always make everything local, it's just my thing. function wasted (killer, weapon, bodypart) sound = playSound("sounds/wasted.mp3") --sound = playSound3D("sounds/wasted.mp3",0,0,0) works also for 3D end addEventHandler("onClientPlayerWasted", getLocalPlayer(), wasted) function stopMySound() stopSound( sound ) end addCommandHandler ( "stopsound", stopMySound ) Link to comment
ThePCGuy Posted January 26, 2013 Author Share Posted January 26, 2013 Ah, thanks. Didnt saw that one. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now