SA-MP Forums Archive
[FilterScript] Music Command Version 1.0 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Music Command Version 1.0 (/showthread.php?tid=513881)



Music Command Version 1.0 - Rittik - 18.05.2014

Intro

This command plays music for all player present in game.The usage of this command is very simple.This command is mainly for Freeroam and Party servers.
Syntax:
/playmusic [hotlink]

/stopmusic


pawn Код:
CMD:playmusic(playerid,params[])
{
if(IsPlayerAdmin(playerid)==1)
{
new str[256];
if(sscanf(params,"s[256]",str))
{
GameTextForPlayer(playerid,"~w~/playsong (hotlink)",3000,5);
return 1;
}
else
{
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
PlayAudioStreamForPlayer(i,str);
}
}
}
else
{
GameTextForPlayer(playerid,"~w~you're not an admin",3000,5);
return 1;
}
return 1;
}

//stopcmd
CMD:stopmusic(playerid,params[])
{
if(IsPlayerAdmin(playerid)==1)
{
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
StopAudioStreamForPlayer(i);
}
}
else
{
GameTextForPlayer(playerid,"~w~you're not an admin",3000,5);
return 1;
}
return 1;
}
The next version will be uploaded soon.

Found bugs pm me.



Re: Music Command Version 1.0 - satafinix - 18.05.2014

Nice , but wich music links exactly? *******?


Re: Music Command Version 1.0 - Rittik - 19.05.2014

No.It plays the direct URL(hotlink).