01.08.2015, 10:30
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.
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; }