//Topo GM
#define AddMusica 20000
//OnPlayerCommandText
if(strcmp(cmdtext,"/addm",true) == 0)
{
ShowPlayerDialog(playerid, AddMusica, DIALOG_STYLE_INPUT, "Adicionar Musica","Para ouvires a musica tens d ecolocar o link em .mp3","Adicionar!","Cancelar!");
return true;
}
//OnDialogResponse
/*Linha 94 */if(dialogid == AddMusica){
if(response){
OnPlayerCommandText(playerid,"/radio");
}
else{
new linkmusica;
PlayAudioStreamForPlayer(playerid, "%s", linkmusica);
}
}
return true;
}
(94) : warning 225: unreachable code
if(dialogid == AddMusica)
{
if(response)
{
OnPlayerCommandText(playerid,"/radio");
}
else
{
new linkmusica;
PlayAudioStreamForPlayer(playerid, "%s", linkmusica);
}
}
return true;
Poste mais linhas acima.
pawn Код:
|
#include <a_samp>
#define Radio 19999
#define AddMusica 20001
public OnPlayerConnect(playerid)
{
OnPlayerCommandText(playerid, "/audiomsg");
return true;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/radio",true) == 0)
{
ShowPlayerDialog(playerid, Radio, DIALOG_STYLE_LIST,"{FF0000}Radios do Tuga-Revolution", "{CD0000}TheHateUGave FM\n{CD3700}Hiper FM\n{CD0000}181FM(Rock)\n{CD3700}Antena 3\n{CD0000}Cidade FM\n{CD3700}Orbital\n{CD0000}Dubstep FM\n{CD3700}Adicionar a minha Musica\n{CD0000}[STOP]RADIOS!","Ligar!", "Fechar!");
return true;
}
if(strcmp(cmdtext,"/addm",true) == 0)
{
ShowPlayerDialog(playerid, AddMusica, DIALOG_STYLE_INPUT, "Adicionar Musica","Para ouvires a musica tens d ecolocar o link em .mp3","Adicionar!","Cancelar!");
return true;
}
return false;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == Radio)
{
if(response)
{
if(listitem == 0)
{
//THUG FM
PlayAudioStreamForPlayer(playerid, "http://193.164.131.215:9992/");
return true;
}
if(listitem == 1)
{
//Hiper FM
PlayAudioStreamForPlayer(playerid, "http://hiper.fm/emissao/playlist_hiper96.pls");
return true;
}
if(listitem == 2)
{
//Radio 181fm(rock)
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=37586");
return true;
}
if(listitem == 3)
{
//Antena 3
PlayAudioStreamForPlayer(playerid, "http://195.245.168.21/antena3.asx");
return true;
}
if(listitem == 4)
{
//CidadeFm
PlayAudioStreamForPlayer(playerid, "http://www.surfmusic.de/m3u/cidade-fm-dsl,8390.m3u");
return true;
}
if(listitem == 5)
{
//Orbital
PlayAudioStreamForPlayer(playerid, "mms://stream.radio.com.pt/ROLI-ENC-401.asx");
return true;
}
if(listitem == 6)
{
//Dubstep radio
PlayAudioStreamForPlayer(playerid, "http://72.232.40.182:80");
return true;
}
if(listitem == 7)
{
OnPlayerCommandText(playerid,"/addm");
return true;
}
if(listitem == 8)
{
StopAudioStreamForPlayer(playerid);
return true;
}
return true;
}
return true;
//Adicionar musica
if(dialogid == AddMusica)
{
if(response)
{
OnPlayerCommandText(playerid,"/radio");
}
else
{
new linkmusica;
PlayAudioStreamForPlayer(playerid, "%s", linkmusica);
}
}
return true;
}
return false;
}