Jump to content

Server music, is there such a thing?!


Fintagenewb

Recommended Posts

Posted

Yes, title explains it. but i was on this MTA DAY-Z server and when i was on the login screen, last resort by papa roach came on, It was awesome only for a few seconds though... I was wondering how did they add this music? can anyone help? or know how?

-Thanks

Posted

Sounds can easily be played on the client by using the playSound function:

element playSound ( string soundPath, [ bool looped = false ] ) 

https://wiki.multitheftauto.com/wiki/PlaySound

Set the soundPath to a sound file url or include the sound in the resource, I would recommend the first alternative. To stop the sound you can use destroyElement() with the sound element as argument.

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...