In-Game Music Player for ALL +REP - 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: In-Game Music Player for ALL +REP (
/showthread.php?tid=330449)
In-Game Music Player for ALL +REP -
TheMightyEddy - 01.04.2012
I want a little system wherewhen I type /music [1-10] or something likethat, itwill playmy preset music or it will play it from a website. Anyone know of something likethis? Note:I want to playto everyone in the game, not just to me.
+REP!
Re: In-Game Music Player for ALL +REP -
Tanush123 - 01.04.2012
PlayAudioStreamForPlayer
Re: In-Game Music Player for ALL +REP -
TheMightyEddy - 01.04.2012
Quote:
Originally Posted by Tanush123
|
Yes thanks I saw that but it says it's only for a specific player. I want it for all. Do you know how please?
Re: In-Game Music Player for ALL +REP -
Avi57 - 01.04.2012
try this:
Код:
stock PlayAudioStreamForAll(url[])
{
for(new i; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected( i ))
{
PlayAudioStreamForPlayer(i, url, x, y, z, distance);
}
}
return 1;
}
Re: In-Game Music Player for ALL +REP -
TheMightyEddy - 01.04.2012
Okay thanks sir for this and what do I put for the x, y, z, an distance? Or do I leave it blank?
Re: In-Game Music Player for ALL +REP -
Avi57 - 01.04.2012
leave them blank or put as 1.
Huh... what about my rep+1
Re: In-Game Music Player for ALL +REP -
TheMightyEddy - 01.04.2012
Okay thanks. I will try that and let you know how it goes. Then I will give you a +rep.
Re: In-Game Music Player for ALL +REP -
TheMightyEddy - 01.04.2012
Quote:
Originally Posted by Avi57
try this:
Код:
stock PlayAudioStreamForAll(url[])
{
for(new i; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected( i ))
{
PlayAudioStreamForPlayer(i, url, x, y, z, distance);
}
}
return 1;
}
|
Nope that doesn't work. I was expecting it to play when the player joined the game but nope. But I actually wanted it so when I type /music 1 or /music 2 it will play my previously saved music and /stopmusic would stop the music.
Re: In-Game Music Player for ALL +REP -
Jonny5 - 01.04.2012
what command system are you using?
zcmd,ycmd,dcmd ?
strcmp?
Re: In-Game Music Player for ALL +REP -
TheMightyEddy - 01.04.2012
Quote:
Originally Posted by Jonny5
what command system are you using?
zcmd,ycmd,dcmd ?
strcmp?
|
I'm using zcmd