Sarge Posted June 2, 2011 Share Posted June 2, 2011 Is this possible? If so, how? And i want 2 sounds to be playes at the same time, i have mw2 sounds, and i thought it would be cool Link to comment
NotAvailable Posted June 2, 2011 Share Posted June 2, 2011 function playDaSound() sound = playSound("name.mp3", false) setSoundVolume(sound, 0.5) end addEventHandler("onClientPlayerSpawn", getLocalPlayer(), playDaSound) Link to comment
Sarge Posted June 3, 2011 Author Share Posted June 3, 2011 (edited) I will go test it out, but is it possible to have 2 sounds play at the same time? Or is it that i just add it twise? And is it possible when i press a button a sound plays? (mw2 killstreak style, and for ALL players in the server) Im sorry, maybe i did it wrong, i have NO idea how to make a resource, maybe you can? Becouse i dont Edited June 3, 2011 by Guest Link to comment
Castillo Posted June 3, 2011 Share Posted June 3, 2011 just use playSound function whenever you need it.. Link to comment
NotAvailable Posted June 3, 2011 Share Posted June 3, 2011 first we need a button: button = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "click!", true ) Now, we need to add the event so when u click the button the sound plays: button = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "click!", true ) addEventHandler("onClientGUIClick", button, playDaSound) Now we need to add the function (playDaSound): button = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "click!", true ) addEventHandler("onClientGUIClick", button, playDaSound) function playDaSound() sound = playSound("name.mp3", false) setSoundVolume(sound, 0.5) end Link to comment
Sarge Posted June 3, 2011 Author Share Posted June 3, 2011 I got ZERO knowlage how that works, if someone could be so kind and make that as a recourse for me? (sorry if i typed something wrong) Link to comment
Castillo Posted June 3, 2011 Share Posted June 3, 2011 Maybe it's time to learn? https://wiki.multitheftauto.com/wiki/Scr ... troduction 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