[FilterScript] Music System
#1

Hello, Its a music system to play songs using mp3 URL.

Information
In this system a admin can run a music for players (using mp3 URL)
also he can stop it but if a player dont like the music
he can stop for his self using /stop.

Commands
/musica - Run the music using url for everyone.
/stopa - Stop it for every.
/stop - It will stop the song for the player who used this command.

Requirements
Zeex - ZCMD.


Code:
CMD:musica(playerid, params[])
{
	if(IsPlayerAdmin(playerid))
	{
		if(isnull(params))
		{
		    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /musica [URL]");
		    SendClientMessage(playerid, COLOR_WHITE, "NOTE: /stopa to stop music!");
		}
		else
		{
			new string[128], name[24];
                        GetPlayerName(playerid,name,24);
	    	        format(string,sizeof(string),"Admin %s started a new song!",name);
			SendClientMessageToAll(-1,string);
			for(new i;i<MAX_PLAYERS;i++)
			{
				PlayAudioStreamForPlayer(i, params);
			}
		}
	} else SendClientMessage(playerid, -1, "Invalid command.");
	return 1;
}
CMD:stopa(playerid)
{
	if(IsPlayerAdmin(playerid))
	{
	    for(new i;i<MAX_PLAYERS;i++)
	    {
	        StopAudioStreamForPlayer(i);
	    }
	} else SendClientMessage(playerid, -1, "Invalid command.");
	return 1;
}
CMD:stop(playerid)
{
	StopAudioStreamForPlayer(playerid);
	return 1;
}
Reply
#2

Not bad.
Reply
#3

Inno my baby, Awesome work.
Reply
#4

Awesome work.
Reply
#5

Thanks Everyone.
Reply
#6

Cool fs nice work
Reply
#7

Thanks for share
Reply
#8

Good FS! Congratulations.
Reply
#9

Good
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)