Some music in onplayerrequestclass - 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: Some music in onplayerrequestclass (
/showthread.php?tid=444357)
Some music in onplayerrequestclass -
mickos - 16.06.2013
Hi guys,
I want to add some music in OnPlayerRequestClass, but I dont know how to do that, I've tried a lot of things that I found in this forum and ****** etc.. But without results. My question is if anyone can help me out.
Thanks
mickos
Re: Some music in onplayerrequestclass -
Dopefull - 16.06.2013
Код:
public OnPlayerRequestClass(playerid,classid)
{
PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls");
return 1;
}
Just change the URL to your specified radio channel
Re: Some music in onplayerrequestclass -
DrTHE - 16.06.2013
pawn Код:
new bool:playmusic[MAX_PLAYERS];
public OnPlayerRequestClass(playerid, classid)
{
if(playmusic[playerid] == false) {
// PlayAudioStreamForPlayer or PlayerPlaySound
playmusic[playerid] = true;
}
return 1;
}
public OnPlayerDisconnect(playerid)
{
playmusic[playerid] = false;
return 1;
}
About
:
PlayAudioStreamForPlayer
PlayerPlaySound
Have fun.
Re: Some music in onplayerrequestclass -
DaRk_RaiN - 16.06.2013
Quote:
Originally Posted by Dopefull
Код:
public OnPlayerRequestClass(playerid,classid)
{
PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls");
return 1;
}
Just change the URL to your specified radio channel
|
That will play the music each time player clicks ">>>>" next section button.
I'd use a variable to detects if it's the first class.
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
if(Var[playerid] == 0){
PlayAudioStreamForPlayer(playerid, url[])
Var[playerid] = 1;
}
return 1;
}
And for your question, it's this function:
PlayAudioStreamForPlayer
ADD: too damn late.
Re: Some music in onplayerrequestclass -
mickos - 16.06.2013
I dont have my own music station
Re: Some music in onplayerrequestclass -
Dopefull - 16.06.2013
Quote:
Originally Posted by DaRk_RaiN
That will play the music each time player clicks ">>>>" next section button.
I'd use a variable to detects if it's the first class.
pawn Код:
public OnPlayerRequestClass(playerid, classid) { if(Var[playerid] == 0){ PlayAudioStreamForPlayer(playerid, url[]) Var[playerid] = 1; } return 1; }
And for your question, it's this function:
PlayAudioStreamForPlayer
ADD: too damn late.
|
Well I'm new to all this so I didn't know
![Smiley](images/smilies/smile.png)
OP use this example instead
Quote:
Originally Posted by mickos
I dont have my own music station
|
Use this site:
www.shoutcast.com and search for the specific radio that you like