[Tutorial] Making a music command.
#1

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:
pawn Код:
#include <zcmd>
#define COLOR_GREEN 0x00FF00FF
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.
pawn Код:
CMD:burn(playerid, params[])
{
Now we are going to make it global so everyone in the server will hear it.
pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
{
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.
pawn Код:
PlayAudioStreamForPlayer(i,"http://dl.farskids405.com/Aria/92/4/15/Ellie%20Goulding%20-%20Burn%20[128].mp3");
Now we are going to make a message that will tell players the name of the song that is playing.
pawn Код:
SendClientMessageToAll(COLOR_GREEN,"Track playing-Ellie Goulding - Burn");
}
return 1;
}
Now we are finished,your cmd should look like this:
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;
}
If you need any help please comment and please rep this tut.
Thanks-Jeremy
Reply


Messages In This Thread
Making a music command. - by jdog105 - 02.11.2013, 18:44
Re: Making a music command. - by bensmart469 - 02.11.2013, 21:32
Re: Making a music command. - by Albright - 03.11.2013, 08:03
Re: Making a music command. - by LeeXian99 - 03.11.2013, 09:56
Re: Making a music command. - by iGetty - 04.11.2013, 03:57
AW: Making a music command. - by Skimmer - 04.11.2013, 14:50
Re: AW: Making a music command. - by jdog105 - 05.02.2014, 20:51
Re: Making a music command. - by BullseyeHawk - 05.02.2014, 21:18
Re: Making a music command. - by TheFlyer - 05.02.2014, 21:29
Re: Making a music command. - by PowerPC603 - 06.02.2014, 05:56

Forum Jump:


Users browsing this thread: 1 Guest(s)