Jump to content

Help : With Script


Timic

Recommended Posts

Hi, I'm here because I want little help. I had troubles! :(

  
function PlayMyMusic ( ) 
  
local sound = playSound("sound.mp3",false)  
setSoundVolume(sound, 3.0) 
end) 
  
addEvent("playMyMusic",true) 
addEventHandler("playMyMusic", getRootElement( ), function( ) 
addCommandHandler("disco", playMyMusic) 
  

I hope you'll help me ! :D

Edited by Guest
Link to comment
Hi, Im Here Because I Want Little Help. I Had In Troubles! :(
  
function PlayMyMusic ( ) 
  
local sound = playSound("sound.mp3",false)  
setSoundVolume(sound, 3.0) 
end) 
  
addEvent("playMyMusic",true) 
addEventHandler("playMyMusic", getRootElement( ), function( ) 
addCommandHandler("disco", playMyMusic) 
  

I Hope You Guys Help Me ! :D

  
function PlayMyMusic ( ) 
local sound = playSound("sound.mp3",false)  
setSoundVolume(sound, 3.0) 
end 
addCommandHandler("disco", PlayMyMusic) 
  

If all you want is to start the song when you type /disco, you do not need an event :)

this should work but make sure you're running it clientside

Edited by Guest
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...