This line is too long [Help] -
vikoo - 04.11.2016
Hello, i added a music for my server but it in filterscript but when compile it's gives me error this line is too long
then i deleted some music and it's work
i need an idea to add all my music but not on same line
Re: This line is too long [Help] -
vikoo - 05.11.2016
now iam not have errors but i can't add more music i need another dialog but idk about it
Код:
CMD:music(playerid, params[]) {
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "{FFFF00}MP3 Player By victor","Keremcem-Yasiyorum Hala\nBstreet-Goodlife\nThomas-Little Wonders\nMylife\n{FFFFFF}LetitRock\nAlorsStremae\n1D-Perfect\nNameOfLove\nAdelle-Hello\nElsa7eb-elfager\nMafe4-sa7eb-beytsa7eb\nFartka-Fartka\nFloRida-MyHouse\nKeremcem - Son Bir Kez\nKeremcem-Berbat\nThe-Crew-Cuts\nKeremcem-Kьstьm Hayata indir\nZaynMalik-PillowTalk\n1D-StoryOfMyLife\nTreat You Better\nStoppa musica","Ok","Exit");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case 1:
{
switch(listitem)
{
case 0:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://mobilmp3.net/files/Turk%20Pop/Keremcem/Keremcem_-_Yasiyorum_Hala_-_MobilMp3.Net.mp3"); // Keremcem-Yasiyorum Hala
}
case 1:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://xsfserver.com/music/GoodLife.mp3"); //Black street-Goodlife
}
case 2:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://www.piecykdesigns.com/transfer/myspace/mp3play/musik/Rob%20Thomas%20-%20Little%20Wonders%20(Radio%20Edit).mp3"); //Thomas-Little Wonders
}
case 3:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://xsfserver.com/music/MyLife.mp3"); //Mylife
}
case 4:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://xsfserver.com/music/LetItRock.mp3"); //let it rock
}
case 5:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "https://dl.dropboxusercontent.com/s/i4t87fvile4omxj/AlorsStremae.mp3"); //alors
}
case 6:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://dl.novinmusic.com/Music/Foreign/2015/10/16/One%20Direction%20-%20Perfect%20(128).mp3"); //1Direction-Perfect
}
case 7:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://s2.server-dl.asia/ali/music/farv/Martin%20Garrix%20Ft.%20Bebe%20Rexha%20-%20Name%20of%20Love%28320%29.mp3"); //Martin Garrix-name of love
}
case 8:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://play.songsmp3.link/Singles/Hello%20(Adele).mp3"); //Adelle-Hello
}
case 9:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://s4.3lbh.com/s/GywILYVkDR3xUZOCDQw1lOWth.mp3"); //Elsa7eb-elfager
}
case 10:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://s4.3lbh.com/s/eiNQh0Ulx2MLMEHAf0SDwpgyL.mp3"); //Mafe4-sa7eb-beytsa7eb
}
case 11:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://s3.3lbh.com/s/89IG38EV.mp3"); //Fartka-Fartka
}
case 12:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://song.9xbeast.com/320/My%20House%20-%20Flo%20Rida%20(320kbps).mp3"); //florida-my house
}
case 13:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://cdn.mp3indirmobil.net/d/keremcem/keremcem-son-bir-kez-agustos-bocekleri.mp3"); //Keremcem - Son Bir Kez
}
case 14:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://cdn.mp3indirmobil.net/d/keremcem/keremcem-berbat.mp3"); //Keremcem - Berbat
}
case 15:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "https://joetroiano.files.wordpress.com/2011/06/the-crew-cuts-sh-boom-sh-boom.mp3"); //The-Crew-Cuts
}
case 16:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://cdn.mp3indirmobil.net/mp3s/keremcem/keremcem-kustum-hayata.mp3"); //Keremcem - Kьstьm Hayata indir
}
case 17:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://kobznation.com.ng/wp-content/uploads/2016/01/Zayn_Malik_-_Pillowtalk_kobznation.com.mp3"); //ZaynMalik-PillowTalk
}
case 18:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://sadieraeandco.com/wp-content/uploads/2013/12/Story-of-My-Life.mp3"); //1D-StoryOfMyLife
}
case 19:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://dl.tak3da.com/download/1395/03/Shawn%20Mendes%20-%20Treat%20You%20Better%20[320].mp3"); //Treat You Better
}
case 20:
{
StopAudioStreamForPlayer(playerid);
}
}
}
}
}
return 1;
}
Re: This line is too long [Help] -
vikoo - 05.11.2016
can you learn me how to do it ? or a page for tutorial that !
Re: This line is too long [Help] -
RyderX - 05.11.2016
He meant there's other DIALOG STYLE Which it let u can make more cases than this one which ur using
Re: This line is too long [Help] -
vikoo - 05.11.2016
so i need that dialog how can i get it?
Re: This line is too long [Help] -
RyderX - 05.11.2016
i thinks this should be...
PHP код:
#include <a_samp>
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == id)
{
if(response)
{
if(listitem==0)
{
//Your Action...
}
if(listitem==1)
{
//Your Action...
}
if(listitem==2)
{
//Your Action...
}
if(listitem==3)
{
//Your Action...
}
if(listitem==4)
{
//Your Action...
}
if(listitem==5)
{
//Your Action...
}
if(listitem==6)
{
//Your Action...
}
if(listitem==7)
{
//Your Action
}
if(listitem==8)
{
//your Action
}
if(listitem==9)
{
//Your Action
}
if(listitem==10)
{
//your Action
}
if(listitem==11)
{
//your action
}
if(listitem==12)
{
//your action
}
if(listitem==13)
{
//Your action
}
if(listitem==14)
{
//YOUR ACTION
}
if(listitem==15)
{
//YOUR ACTION!
}
if(listitem==16)//Close
{ //You Can Add more If(listitem==17.......)
}
}
return 1;
}
return 0;
}
Re: This line is too long [Help] -
IceBilizard - 05.11.2016
No need to make another dialog he can do it on 1 dialog with this way and he can use strcat too.
PHP код:
CMD:music(playerid, params[])
{
string[1058];
format(string,sizeof(string), "%sKeremcem-Yasiyorum Hala\n", string);
format(string,sizeof(string), "%sBstreet-Goodlife\n", string);
format(string,sizeof(string), "%sThomas-Little Wonders\n", string);
format(string,sizeof(string), "%sMylife\n", string);
format(string,sizeof(string), "%s{FFFFFF}LetitRock\n", string);
format(string,sizeof(string), "%sAlorsStremae\n", string);
format(string,sizeof(string), "%s1D-Perfect\n", string);
format(string,sizeof(string), "%sNameOfLove\n", string);
format(string,sizeof(string), "%sAdelle-Hello\n", string);
format(string,sizeof(string), "%sElsa7eb-elfager\n", string);
format(string,sizeof(string), "%sMafe4-sa7eb-beytsa7eb\n", string);
format(string,sizeof(string), "%sFartka-Fartka\n", string);
format(string,sizeof(string), "%sFloRida-MyHouse\n", string);
format(string,sizeof(string), "%sKeremcem - Son Bir Kez\n", string);
format(string,sizeof(string), "%sKeremcem-Berbat\n", string);
format(string,sizeof(string), "%sThe-Crew-Cuts\n", string);
format(string,sizeof(string), "%sKeremcem-Kьstьm Hayata indir\n", string);
format(string,sizeof(string), "%sZaynMalik-PillowTalk\n", string);
format(string,sizeof(string), "%s1D-StoryOfMyLife\n", string);
format(string,sizeof(string), "%sTreat You Better\n", string);
format(string,sizeof(string), "%sStoppa musica", string);
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "{FFFF00}MP3 Player By victor",string,"Ok","Exit");
return 1;
}