Quote:
Originally Posted by PT
I think is this you want...
i don't test if this code :S
pawn Код:
stock PlayStreamForAll(link[]) { for(new i = 0; i < MAX_PLAYERS; i++) { StopAudioStreamForPlayer(i); PlayAudioStreamForPlayer(i, link); } print("[AdmCmd]: Admin Is Streaming Music Globally."); return 1; }
if(strcmp(cmd, "/stream", true) == 0) { if(PlayerInfo[playerid][pAdmin] >= 1) { new link[128]; if(sscanf(cmdtext, "s[128]", cmd, link)) { SendClientMessage(playerid, COLOR_GREY,"USAGE: /stream <link>"); return 1; } PlayStreamForAll(link); } else { SendClientMessage(playerid, COLOR_GREY," You are not authorized to use that command !"); } return 1; }
if(strcmp(cmd, "/stopstream", true) == 0) { if(PlayerInfo[playerid][pAdmin] >= 1) { for(new i = 0; i < MAX_PLAYERS; i++) { StopAudioStreamForPlayer(i); } } return 1; }
this uses SSCANF by ******
|
Well, what about stock PlayStreamForAll(link[]) ?
Do it that way:
Код:
stock PlayStreamForAll(link[])
{
foreach(Player, i)
//foreach(new i : Player)
{
StopAudioStreamForPlayer(i);
PlayAudioStreamForPlayer(i, link);
}
return 1;
}
Cause this way shows me just Audio stream: <noting here>