Stream a song on a location?
#1

Hello guys! I'm currently making my server ready for the holliday season, and I've mapped Pershing Square into a giant sled basically... Now I'm just missing some music that auto plays and fades the closer you are to it.

Can anyone help me?

The location it needs to be based from is: 1481.1302, -1711.8168, 13.3460

The stream url is: http://puu.sh/lR5cr/804af90807.mp3

Thank you all!
Reply
#2

Код:
PlayAudioStreamForPlayer(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0)
You can use that in order to play the music. Now that will play the audio for one person. So add something simple like
Код:
ChristmasRadio()
{
	foreach(Player, i) {
		if(IsPlayerInRangeOfPoint(i, 7, 1481.1302, -1711.8168, 13.3460))
		{
			PlayAudioStreamForPlayer(i, "http://puu.sh/lR5cr/804af90807.mp3", 1481.1302, -1711.8168, 13.3460, 6, 1)
			continue;
		}
	}
}
I am pretty sure that will work.
Reply
#3

Quote:
Originally Posted by Alex_T
Посмотреть сообщение
Код:
PlayAudioStreamForPlayer(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0)
You can use that in order to play the music. Now that will play the audio for one person. So add something simple like
Код:
ChristmasRadio()
{
	foreach(Player, i) {
		if(IsPlayerInRangeOfPoint(i, 7, 1481.1302, -1711.8168, 13.3460))
		{
			PlayAudioStreamForPlayer(i, "http://puu.sh/lR5cr/804af90807.mp3", 1481.1302, -1711.8168, 13.3460, 6, 1)
			continue;
		}
	}
}
I am pretty sure that will work.
Instead of a timer and looping throw players every certain time, use areas (check out streamer).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)