26.12.2014, 18:14
How to play music play for all players ? example /music [link]...
CMD:music(playerid, params[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, ''Link Here'');
}
return 1;
}
CMD:music(playerid, params[])
{
new url[128];
if(sscanf(params,"s[128]",url)) return SendClientMessage(playerid,-1,"USAGE: /music (url)");
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, url);
}
return 1;
}
CMD:music(playerid, params[])
{
if(!PlayerIsAdmin(playerid)) return SendClientMessage(playerid,-1,"ERROR: Only administrators may use this command.");
{
new url[128];
if(sscanf(params,"s[128]",url)) return SendClientMessage(playerid,-1,"USAGE: /music (url)");
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, url);
}
}
return 1;
}