Jump to content

[REQ] Sound plays when you respawn


Sarge

Recommended Posts

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 by Guest
Link to comment

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...