Audio Stream before spawn
#1

Hey, could anyone give me a well detailed tutorial about how to add a song like before you spawn.

OBS! I want to decide which song, like for example Rebecca Black - Friday.
Reply
#2

pawn Код:
public OnPlayerSpawn(playerid)
{
    PlayAudioStreamForPlayer(playerid, url)
    return 1;
}
Reply
#3

He said before you spawn, well you could do it under OnPlayerConnect, when a player will connect the song will start. And use "PlayAudioStreamForPlayer" function to do it. You have to upload the song you want to a streaming website, and then use the url in the function.
Reply
#4

ok, so if I'd like to play off a song on the public OnPlayerConnect, then I'll be like this-..


pawn Код:
PlayAudioStreamForPlayer(playerid, [url]www.*******.com/watch?v=gADkZ_ML5d8);[/url]
??

Cause that gives me this error message:

: error 017: undefined symbol "www"
: error 029: invalid expression, assumed zero
: error 017: undefined symbol "*******"
: fatal error 107: too many error messages on one line
Reply
#5

The link either has to be .pls or .mp3 format. You can upload a .mp3 to your website and use that for the OnPlayerConnect callback for example: http://www.mywebsite.com/title.mp3 and it plays the selected file. ******* links unfortunately are not supported by PlayAudioStreamForPlayer.
Reply
#6

my webside.. lol.. ********? -_- do you know any websites?
Reply
#7

you may can upload to dropbox or w/e that can upload files.
Reply
#8

any you recommend? If so-.. link?
Reply
#9

dropbox.com

when you upload a .mp3 song there, press on get link so you'll get link. paste it on your script. and you're done
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)