Sarge Posted June 2, 2011 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
NotAvailable Posted June 2, 2011 Posted June 2, 2011 function playDaSound() sound = playSound("name.mp3", false) setSoundVolume(sound, 0.5) end addEventHandler("onClientPlayerSpawn", getLocalPlayer(), playDaSound)
Sarge Posted June 3, 2011 Author 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
NotAvailable Posted June 3, 2011 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
Sarge Posted June 3, 2011 Author 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)
Castillo Posted June 3, 2011 Posted June 3, 2011 Maybe it's time to learn? https://wiki.multitheftauto.com/wiki/Scr ... troduction
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