25.07.2013, 11:07
pawn Код:
stock PlayStreamForAll(url[])
{
foreach(Player, i)
{
StopAudioStreamForPlayer(i);
PlayAudioStreamForPlayer(i, url);
}
print("[AdmCmd]: Admin Is Streaming Music Globally.");
return 1;
}
pawn Код:
if(strcmp(cmd, "/stream", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new url[128];
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
while ((idx < length) && ((idx - offset) < (sizeof(url) - 1)))
{
url[idx - offset] = cmdtext[idx];
idx++;
}
url[idx - offset] = EOS;
foreach(Player, i)
{
PlayStreamForAll(url);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY," You are not authorized to use that command !");
}
}