17.09.2013, 16:37
(
Последний раз редактировалось Vege; 17.09.2013 в 17:40.
)
Audio Streaming
This Is My First Tutorial!
Everyone may give their Feedback No Matter How Bad it is !
First Of All You Need to put this at the Top Of your FilterScript and/or GameMode Script
You Can get these two Includes From Here:
zcmd - Credits To ZeeX
foreach - Credits To ******
Now,
Coming to part of the command that would be used to play audio for all players,
Its a very Simple Command but useful enough, you may write your own command or you may use the following:
Note:
You might Have to Change This:
^This Must Be according to your own GM/FS!
Its the very basic Command for Streaming Music.
Now,
Since we Know what command we can use to stream audio for everyone and getting excited we would just grab any link from the internet and use it, but DING!
Here's where the problem might occur,
Not just any link might work with this command plus for music to play you need the direct song link,
So,
To make it work you can get the song link from
Here
You Can Search For any Song of any genre and you would hopefully find it there!
When you search a list of URL's appear there you may copy any one of them and paste it ingame, Voila!
Note: This Tutorial has been made to Help New Scripters Others may also Benefit From it!
I Made This Tutorial because when I was a newbie I couldnt find anything which explained that! Plus, I didnt find any other tutorial similar to this one!
I Hope People Like This!
This Is My First Tutorial!
Everyone may give their Feedback No Matter How Bad it is !
First Of All You Need to put this at the Top Of your FilterScript and/or GameMode Script
pawn Код:
#include <zcmd>
#include <foreach>
zcmd - Credits To ZeeX
foreach - Credits To ******
Now,
Coming to part of the command that would be used to play audio for all players,
Its a very Simple Command but useful enough, you may write your own command or you may use the following:
pawn Код:
CMD:playmusic(playerid, params[])
{
foreach(Player, i)
{
if (PlayerInfo[playerid][Level] >= 4)
{
if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /playmusic [Link]");
PlayAudioStreamForPlayer(i, params);
}
}
return 1;
}
You might Have to Change This:
pawn Код:
if (PlayerInfo[playerid][Level] >= 4)
Its the very basic Command for Streaming Music.
Now,
Since we Know what command we can use to stream audio for everyone and getting excited we would just grab any link from the internet and use it, but DING!
Here's where the problem might occur,
Not just any link might work with this command plus for music to play you need the direct song link,
So,
To make it work you can get the song link from
Here
You Can Search For any Song of any genre and you would hopefully find it there!
When you search a list of URL's appear there you may copy any one of them and paste it ingame, Voila!
Note: This Tutorial has been made to Help New Scripters Others may also Benefit From it!
I Made This Tutorial because when I was a newbie I couldnt find anything which explained that! Plus, I didnt find any other tutorial similar to this one!
I Hope People Like This!