PDA

View Full Version : How do I set login music?


davidstyle1125
24/12/2014, 04:26 PM
Hello, How Do I set logic music?w
when people type pass, I want to be a login music, and when they spawn it will stop..
just for the login

kamiliuxliuxliux
24/12/2014, 04:28 PM
PlayAudioStreamForPlayer() and StopAudioStreamForPlayer() for your favorite music etc.

davidstyle1125
24/12/2014, 04:36 PM
inside the () i just put the URL? in both of them?

Guest4390857394857
24/12/2014, 04:36 PM
Under OnplayerConnect - Add this!


PlayAudioStreamForPlayer(playerid, "link_of_music");


Under OnPlayerSpawn - Add this!


StopAudioStreamForPlayer(playerid);


Hope it helped! CHEERS!

davidstyle1125
24/12/2014, 04:53 PM
When the server loads.. (the verona beach background) it plays the music.. but then when it comes to the login page, music stops..

RayC
24/12/2014, 05:16 PM
When the server loads.. (the verona beach background) it plays the music.. but then when it comes to the login page, music stops..

Make sure you have StopAudioStreamForPlayer(playerid); under OnPlayerSpawn and not under OnPlayerRequestClass

davidstyle1125
24/12/2014, 05:22 PM
Yeah Its under "OnPlayerSpawn"..
Even when I disabled the "StopAudioStreamForPlayer(playerid);"...
I had same result.. it plays just at the start, and when the log-in page comes, it stops.
with the StopAudio.. and without it.. I have the same result.

RayC
24/12/2014, 05:25 PM
Yeah Its under "OnPlayerSpawn"..
Even when I disabled the "StopAudioStreamForPlayer(playerid);"...
I had same result.. it plays just at the start, and when the log-in page comes, it stops.
with the StopAudio.. and without it.. I have the same result.

Mhmm..
PM me your skype and I'll see if I could help.

Biess
24/12/2014, 07:07 PM
PlayAudioStreamForPlayer(playerid, "link_of_music");

Put it under OnPlayerRequestClass.

And the music stop under OnPlayerSpawn.