SA-MP Forums Archive
How do I set login music? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How do I set login music? (/showthread.php?tid=552456)



How do I set login music? - davidstyle1125 - 24.12.2014

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


Re: How do I set login music? - kamiliuxliuxliux - 24.12.2014

PlayAudioStreamForPlayer() and StopAudioStreamForPlayer() for your favorite music etc.


Re: How do I set login music? - davidstyle1125 - 24.12.2014

inside the () i just put the URL? in both of them?


Re: How do I set login music? - Guest4390857394857 - 24.12.2014

Under OnplayerConnect - Add this!

pawn Код:
PlayAudioStreamForPlayer(playerid, "link_of_music");
Under OnPlayerSpawn - Add this!

pawn Код:
StopAudioStreamForPlayer(playerid);
Hope it helped! CHEERS!


Re: How do I set login music? - davidstyle1125 - 24.12.2014

When the server loads.. (the verona beach background) it plays the music.. but then when it comes to the login page, music stops..


Re: How do I set login music? - RayC - 24.12.2014

Quote:
Originally Posted by davidstyle1125
Посмотреть сообщение
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


Re: How do I set login music? - davidstyle1125 - 24.12.2014

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.


Re: How do I set login music? - RayC - 24.12.2014

Quote:
Originally Posted by davidstyle1125
Посмотреть сообщение
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.


Re: How do I set login music? - Biess - 24.12.2014

PlayAudioStreamForPlayer(playerid, "link_of_music");

Put it under OnPlayerRequestClass.

And the music stop under OnPlayerSpawn.