[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


Messages In This Thread
Music System - by Inn0cent - 01.08.2015, 10:30
Re: Music System - by justice96 - 01.08.2015, 10:35
Re: Music System - by SpikY_ - 01.08.2015, 10:44
Re: Music System - by RedLabel - 01.08.2015, 12:09
Re: Music System - by Inn0cent - 01.08.2015, 13:18
Re: Music System - by Jakwob - 01.08.2015, 13:31
Re: Music System - by dangtruong - 06.08.2015, 09:13
Re: Music System - by Rei123 - 16.08.2015, 09:52
Re: Music System - by xXSoUhAiLXx - 16.08.2015, 17:24

Forum Jump:


Users browsing this thread: 2 Guest(s)