Help mp3
#1

Hi all today im try to make a mp3 system on script i don't have any type of warn or error but the command don't work
where is the problem ? thx to all will try to help me

#include <a_samp>
#include <zcmd>
#include <streamer>

public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/mp3", true))
{
ShowPlayerDialog(playerid, 4400, DIALOG_STYLE_LIST, "MP3", "{FFFFFF}Dubstep FM\nCapital FM\nPulse 87\nRadio Klass Romania\nIts a Trap Radio\nRussian Hits Radio\nMadein Hits Radio\nAbsolute Hits Radio\nDnB Pirate Radio\nI Love To Dance Radio\nElectronic Playground Radio\nRadio Gothic\nSTOP MUSICA OFF", "Select", "Close");
}
return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

////////////////////////////////// MP3 //////////////////////
switch(dialogid) {
case 4400:
{
if (!response) return SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
if(response) {
switch(listitem) {
case 0:
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=40568");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Dubstep FM");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Dubstep FM");

}
case 1:
{
PlayAudioStreamForPlayer(playerid, "http://media-ice.musicradio.com/CapitalMP3.m3u");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Capital FM");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Capital FM");
}

case 2:
{
PlayAudioStreamForPlayer(playerid, "http://icy3.abacast.com/pulse87-pulse87mp3-64");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Pulse 87");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Pulse 87");
}
case 3:
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=7581");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Radio Klass Romania");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Radio Klass Romania");
}
case 4:
{
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3146548/listen.m3u");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Its a Trap Radio");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Its a Trap Radio");
}
case 5:
{
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/1891409/listen.m3u");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Russian Hits Radio");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Russian Hits Radio");
}
case 6:
{
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3064006/listen.m3u");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Madein Hits Radio");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Madein Hits Radio");
}
case 7:
{
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3367058/listen.m3u");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Absolute Hits Radio");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Absolute Hits Radio");

}
case 8:
{
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3728175/listen.m3u");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into DnB Pirate Radio");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into DnB Pirate Radio");
}
case 9:
{
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3710153/listen.m3u");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into I Love To Dance Radio");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into I Love To Dance Radio");
}
case 10:
{
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3813588/listen.m3u");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Electronic Playground Radio");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Electronic Playground Radio");
}
case 11:
{
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3813588/listen.m3u");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Electronic Playground Radio");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Electronic Playground Radio");
}
case 12:
{
StopAudioStreamForPlayer(playerid);
SendClientMessage(playerid, 0xAA3333AA, "STOP MUSICA OFF");

}
}
}
}
}


return 1;
}
Reply
#2

I see you are using Jakwobs radio system, make sure you have these
Код:
new listitems[] = "1\tDubstep FM\n\
                   2\tCapital FM\n\
				   3\tPulse Radio\n\
				   4\tRadio Klass Romania\n\
				   5\tIts a Trap Radio\n\
				   6\tRussian Hits Radio\n\
				   7\tMadein Hits Radio\n\
				   8\tAbsolute Hits Radio (France)\n\
				   9\tDnB Pirate Radio\n\
				   10\tI Love To Dance Radio\n\
				   11\tElectronic Playground Radio\n\
				   12\tRadio Gothic\n\
				   13\tTurn Off\n";
Reply
#3

no man is not this the problem
Reply
#4

#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>

#define DIALOG_MUSIC 2018


new listitems[] = "1\tDubstep FM\n\
2\tCapital FM\n\
3\tPulse Radio\n\
4\tRadio Klass Romania\n\
5\tIts a Trap Radio\n\
6\tRussian Hits Radio\n\
7\tMadein Hits Radio\n\
8\tAbsolute Hits Radio (France)\n\
9\tDnB Pirate Radio\n\
10\tI Love To Dance Radio\n\
11\tElectronic Playground Radio\n\
12\tRadio Gothic\n\
13\tTurn Off\n\";


public OnPlayerSpawn(playerid)
{
ShowPlayerDialog(playerid,DIALOG_MUSIC,DIALOG_STYL E_LIST,"{33CCFF}List of Music Stations:",listitems,"Tune in","Close");
return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

////////////////////////////////// MP3 //////////////////////
switch(dialogid) {
case 2018:
{
if (!response) return SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
if(response) {
switch(listitem) {
case 0:
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=40568");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Dubstep FM");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Dubstep FM");

}
case 1:
{
PlayAudioStreamForPlayer(playerid, "http://media-ice.musicradio.com/CapitalMP3.m3u");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Capital FM");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Capital FM");
}

case 2:
{
PlayAudioStreamForPlayer(playerid, "http://icy3.abacast.com/pulse87-pulse87mp3-64");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Pulse 87");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Pulse 87");
}
case 3:
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=7581");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Radio Klass Romania");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Radio Klass Romania");
}
case 4:
{
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3146548/listen.m3u");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Its a Trap Radio");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Its a Trap Radio");
}
case 5:
{
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/1891409/listen.m3u");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Russian Hits Radio");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Russian Hits Radio");
}
case 6:
{
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3064006/listen.m3u");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Madein Hits Radio");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Madein Hits Radio");
}
case 7:
{
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3367058/listen.m3u");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Absolute Hits Radio");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Absolute Hits Radio");

}
case 8:
{
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3728175/listen.m3u");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into DnB Pirate Radio");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into DnB Pirate Radio");
}
case 9:
{
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3710153/listen.m3u");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into I Love To Dance Radio");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into I Love To Dance Radio");
}
case 10:
{
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3813588/listen.m3u");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Electronic Playground Radio");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Electronic Playground Radio");
}
case 11:
{
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3813588/listen.m3u");
SendClientMessage(playerid, 0xAA3333AA, "You are tuned into Electronic Playground Radio");
SendClientMessage(playerid, 0xAA3333AA, "Siete sintonizzati into Electronic Playground Radio");
}
case 12:
{
StopAudioStreamForPlayer(playerid);
SendClientMessage(playerid, 0xAA3333AA, "STOP MUSICA OFF");

}
}
}
}
}


return 1;
}
Reply
#5

Quote:
Originally Posted by BlackEvils
Посмотреть сообщение
no man is not this the problem
Actually yes this is the problem, i test it and it says error 037: invalid string (possibly non-terminated string).
Back the world, i would recommend you to reply to his script topic for support
Quote:
Originally Posted by LeXuZ
Посмотреть сообщение
I see you are using Jakwobs radio system, make sure you have these
Код:
new listitems[] = "1\tDubstep FM\n\
                   2\tCapital FM\n\
				   3\tPulse Radio\n\
				   4\tRadio Klass Romania\n\
				   5\tIts a Trap Radio\n\
				   6\tRussian Hits Radio\n\
				   7\tMadein Hits Radio\n\
				   8\tAbsolute Hits Radio (France)\n\
				   9\tDnB Pirate Radio\n\
				   10\tI Love To Dance Radio\n\
				   11\tElectronic Playground Radio\n\
				   12\tRadio Gothic\n\
				   13\tTurn Off\n";
Anyways try this one:
pawn Код:
new listitems[] = "1\tDubstep FM\n\
                  2\tCapital FM\n\
                                   3\tPulse Radio\n\
                                   4\tRadio Klass Romania\n\
                                   5\tIts a Trap Radio\n\
                                   6\tRussian Hits Radio\n\
                                   7\tMadein Hits Radio\n\
                                   8\tAbsolute Hits Radio (France)\n\
                                   9\tDnB Pirate Radio\n\
                                   10\tI Love To Dance Radio\n\
                                   11\tElectronic Playground Radio\n\
                                   12\tRadio Gothic\n\
                                   13\tTurn Off"
;

And next-time please use
Код:
(pawn)bbcode(/pawn)
replaced () with []
Reply
#6

Quote:
Originally Posted by Alex Magaсa
Посмотреть сообщение
Actually yes this is the problem, i test it and it says error 037: invalid string (possibly non-terminated string).
Back the world, i would recommend you to reply to his script topic for support


Anyways try this one:
pawn Код:
new listitems[] = "1\tDubstep FM\n\
                  2\tCapital FM\n\
                                   3\tPulse Radio\n\
                                   4\tRadio Klass Romania\n\
                                   5\tIts a Trap Radio\n\
                                   6\tRussian Hits Radio\n\
                                   7\tMadein Hits Radio\n\
                                   8\tAbsolute Hits Radio (France)\n\
                                   9\tDnB Pirate Radio\n\
                                   10\tI Love To Dance Radio\n\
                                   11\tElectronic Playground Radio\n\
                                   12\tRadio Gothic\n\
                                   13\tTurn Off"
;

And next-time please use
Код:
(pawn)bbcode(/pawn)
replaced () with []
Yes 0 error but the command when i use on server don't work the server say me Uknow command
Reply
#7

Quote:
Originally Posted by BlackEvils
Посмотреть сообщение
Yes 0 error but the command when i use on server don't work the server say me Uknow command
Did you add plugin streamer on server.cfg (loading.. plugins? streamer/sscanf)
Works fine on my test server.
I think i doubt that you are trying to type the command, try to go inside a vehicle and press keyboard: N. Maybe you tried /radio. This radio works by pressing keyboard N when you are inside a vehicle. It will popup a dialog radio.
Reply
#8

okay this is my code proof here https://sampforum.blast.hk/showthread.php?tid=547802 .your problem is you have changed OnDialogResponce to case where it needs to be listitem and read my code again you will see and if your going to pretend it's yours why would you have used new listitem in the first place if you never used it in the code?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)