Streaming music while logging in to spawning
#1

I would like to make it so people listen to a song, when they are connecting up to the point the are spawned.

Like Saints Row, music all they way to the moment they spawn, is this possible?

Also Is it possible to play a certain song like while they player is in jail? Torture with lady gaga or justin beiber lol
Reply
#2

Yes,

Put this under OnPlayerConnect

pawn Код:
PlayAudioStreamForPlayer(playerid, "PUT THE URL HERE");
example:

pawn Код:
public OnPlayerConnect(playerid)
{
    PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls");
    return 1;
}
Reply
#3

how about when in prison or a certain interior?
Reply
#4

Quote:
Originally Posted by Medardo4Life
Посмотреть сообщение
how about when in prison or a certain interior?
PHP код:
PlayAudioStreamForPlayer(playerid"YOUR URL"XYZDistance1); 
X,Y,Z - coordinates in prison
Reply
#5

Another few questions, can more than 1 audio stream be played at once and can the green text showing audio stream url be hidden or not shown?
Reply
#6

Quote:
Originally Posted by Medardo4Life
Посмотреть сообщение
Another few questions, can more than 1 audio stream be played at once and can the green text showing audio stream url be hidden or not shown?
/audiomsg - to hide the text Stream audio

At the same time the player plays only one audio stream, otherwise it would be just noise.
For some players, downloadable music is lag.
So it is better to turn it down every time


PHP код:
 StopAudioStreamForPlayer(playerid); 
Reply
#7

Quote:
Originally Posted by PlayHard
Посмотреть сообщение
Yes,

Put this under OnPlayerConnect

pawn Код:
PlayAudioStreamForPlayer(playerid, "PUT THE URL HERE");
example:

pawn Код:
public OnPlayerConnect(playerid)
{
    PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls");
    return 1;
}
Quote:
Originally Posted by Nixon_West
Посмотреть сообщение
/audiomsg - to hide the text Stream audio

At the same time the player plays only one audio stream, otherwise it would be just noise.
For some players, downloadable music is lag.
So it is better to turn it down every time


PHP код:
 StopAudioStreamForPlayer(playerid); 
is there a way to force players not to see the green text? It seems by default people see it....
Reply
#8

Quote:
Originally Posted by Medardo4Life
Посмотреть сообщение
is there a way to force players not to see the green text? It seems by default people see it....
Nope.
Reply
#9

Quote:
Originally Posted by PlayHard
Посмотреть сообщение
Yes,

Put this under OnPlayerConnect

pawn Код:
PlayAudioStreamForPlayer(playerid, "PUT THE URL HERE");
example:

pawn Код:
public OnPlayerConnect(playerid)
{
    PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls");
    return 1;
}
Thx For this It Works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)