02.11.2013, 18:44
(
Последний раз редактировалось Si|ent; 03.11.2013 в 00:20.
Причина: Server ip/advert removed
)
Hey everyone today ill show you how to make a music cmd,like when you enter the name of the song it plays.
For example if the name is thefox ill do /thefox and the song will play,so lets get started.
First include and define the following:
Now lets make the command.
Put the name of the song as the cmd,my song is called burn so my cmd will be burn.
Now we are going to make it global so everyone in the server will hear it.
Now we have to put the link for the song that we will be streaming,to do this go to a music download site and copy the download link of the song.
Now we are going to make a message that will tell players the name of the song that is playing.
Now we are finished,your cmd should look like this:
If you need any help please comment and please rep this tut.
Thanks-Jeremy
For example if the name is thefox ill do /thefox and the song will play,so lets get started.
First include and define the following:
pawn Код:
#include <zcmd>
#define COLOR_GREEN 0x00FF00FF
Put the name of the song as the cmd,my song is called burn so my cmd will be burn.
pawn Код:
CMD:burn(playerid, params[])
{
pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
{
pawn Код:
PlayAudioStreamForPlayer(i,"http://dl.farskids405.com/Aria/92/4/15/Ellie%20Goulding%20-%20Burn%20[128].mp3");
pawn Код:
SendClientMessageToAll(COLOR_GREEN,"Track playing-Ellie Goulding - Burn");
}
return 1;
}
pawn Код:
CMD:burn(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return 0;
for(new i=0; i<MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i,"http://dl.farskids405.com/Aria/92/4/15/Ellie%20Goulding%20-%20Burn%20[128].mp3");
SendClientMessageToAll(COLOR_GREEN,"Track playing-Ellie Goulding - Burn");
}
return 1;
}
Thanks-Jeremy