Adding Music to the login screen
#1

How can i add music to my login screen ?
Reply
#2

Use PlayAudioStreamForPlayer function.
https://sampwiki.blast.hk/wiki/PlayAudioStreamForPlayer
Reply
#3

so i could use that example code?
Reply
#4

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).
Reply
#5

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;
}
Reply
#6

so where would i put that in the script ? the textdraws?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)