[FilterScript] Music Command Version 1.0
#1

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.
Reply
#2

Nice , but wich music links exactly? *******?
Reply
#3

No.It plays the direct URL(hotlink).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)