27.12.2013, 16:37
(
Последний раз редактировалось GWMPT; 27.12.2013 в 16:43.
Причина: Operaзгo ternбria... :D
)
pawn Код:
forward PlayAudioStreamForAll(url[]);
forward StopAudioStreamForAll();
public PlayAudioStreamForAll(url[]) {
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i))
PlayAudioStreamForPlayer(i, url);
}
return 1;
}
public StopAudioStreamForAll() {
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i))
StopAudioStreamForPlayer(i);
}
return 1;
}
Comando, em zcmd:
pawn Код:
CMD:Radio(playerid, params[]) {
static Bool:on = false;
(!on ? PlayAudioStreamForAll(url) : StopAudioStreamForAll());
(!on ? on = true : on = false);
return 1;
}