Adding Music to the login screen - 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: Adding Music to the login screen (
/showthread.php?tid=612030)
Adding Music to the login screen -
TheARESguy - 13.07.2016
How can i add music to my login screen ?
Re: Adding Music to the login screen -
luke49 - 13.07.2016
Use
PlayAudioStreamForPlayer function.
https://sampwiki.blast.hk/wiki/PlayAudioStreamForPlayer
Re: Adding Music to the login screen -
TheARESguy - 13.07.2016
so i could use that example code?
Re: Adding Music to the login screen -
NaS - 13.07.2016
Quote:
Originally Posted by TheARESguy
so i could use that example code?
|
Yea, it would play SOMA FM then (if you mean the example code from the wiki).
You'll just have to put that into OnPlayerConnect and find a link for your intro music.
If you want to play your own music (an mp3 or similar) you'll have to make it accessible for everyone via a link (webhost).
Re: Adding Music to the login screen -
Iqba - 13.07.2016
https://sampwiki.blast.hk/wiki/PlayAudioStreamForPlayer
You can upload your music to dropbox.
So you use it like this
Код:
public OnPlayerConnect(playerid)
{
PlayAudioStreamForPlayer(playerid, "link from dropbox");
return 1;
}
// and on spawn..
public OnPlayerSpawn(playerid)
{
StopAudioStreamForPlayer(playerid);
return 1;
}
Re: Adding Music to the login screen -
TheARESguy - 13.07.2016
so where would i put that in the script ? the textdraws?