#1

There is a way to start a music or say something in the chatbox when the previous one is finished?
Reply
#2

Simple Command for music:
you can add your own music i suggest to using this site http://musicpleer.cc/
Код:
#include <a_samp>
#include <zcmd>

#define COLOR_LIGHTGREEN 0x9ACD32AA // Verde Chiaro

#pragma tabsize 0

#if defined FILTERSCRIPT
Quote:

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\n1Direction-4-5Sec\n1D-Perfect\nNameOfLove\nAdelle-Hello\nElsa7eb-elfager\nMafe4-sa7eb-beytsa7eb\nCranberries-Ode To My Family\nFloRida-MyHouse\nKeremcem - Son Bir Kez\nKeremcem-Berbat\nCranberries-Zombie\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, "http://dopetune.com/mp3/datas//One_Direction-Four_Five_Seconds_(Rihanna_Cover)-_dopetune_com_533.mp3"); //1Direction-Four Five Seconds
}
case 6:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://dl.novinmusic.com/Music/Foreign/2015/10/16/One%20Direction%20-%20Perfect%20(12.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://hcmaslov.d-real.sci-nnov.ru/public/mp3/Cranberries/Cranberries%20'Ode%20To%20My%20Family'.mp3"); //Cranberries - Ode To My Family
}
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, "http://kaeman.free.fr/Music/Mp3/Cranberries%20-%20Zombie.mp3"); //Cranberries-Zombie
}
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;
}

Reply
#3

IT : Ok vabene ma quando la traccia di una musica finisce, io vorrei che automaticamente ne starta un'altra

EN : Ok but i want when the track finish , it start another one without touching anything
Reply
#4

add this :
and just replace that music links with your own music
Код:
if(dialogid == DIALOG_STYLE_LIST)
        {
        if(response)
                {
                        if(listitem == 0)
                        {
PlayAudioStreamForPlayer(playerid,"https://dl.dropbox.com/s/i4t87fvile4omxj/AlorsStremae.mp3?dl=1");
                        }
                        if(listitem == 1)
                        {
PlayAudioStreamForPlayer(playerid,"https://dl.dropbox.com/s/vaidubo8ftyv1ce/La%20Policia.mp3?dl=1");
                        }
                        if(listitem == 2)
                        {
PlayAudioStreamForPlayer(playerid,"https://dl.dropbox.com/s/54h4ijc7ffxftdx/Black%20Widow.mp3?dl=1");
                        }
                        if(listitem == 3)
                        {
PlayAudioStreamForPlayer(playerid,"https://dl.dropbox.com/s/hhn2bf160tgzn0g/MemoriesDG.mp3?dl=1");
                        }
                        if(listitem == 4)
                        {
PlayAudioStreamForPlayer(playerid,"https://dl.dropbox.com/s/cu02dqyanlzrput/5oya7eklilinifi.mp3?dl=1");
                        }
                        if(listitem == 5)
                        {
PlayAudioStreamForPlayer(playerid,"https://dl.dropbox.com/s/q8u184blqgnfdq4/hakamama.mp3?dl=1");
                        }
                        if(listitem == 6)
                        {
PlayAudioStreamForPlayer(playerid,"http://soundfox.co/download.php?song_id=9652");
                        }
                        if(listitem == 7)
                        {
PlayAudioStreamForPlayer(playerid,"http://soundfox.co/download.php?song_id=10933");
                        }
                        if(listitem == 8)
                        {
PlayAudioStreamForPlayer(playerid,"http://tegos.ru/new/mp3_full/Enrique_Iglesias_feat_Sean_Paul_-_Bailando.mp3");
                        }
                        if(listitem == 9)
                        {
PlayAudioStreamForPlayer(playerid,"http://soundfox.me/download.php?song_id=10149");
                        }
                        if(listitem == 10)
                        {
PlayAudioStreamForPlayer(playerid,"http://xsfserver.com/music/LetItRock.mp3");
                        }
                        if(listitem == 11)
                        {
PlayAudioStreamForPlayer(playerid,"http://xsfserver.com/music/Club.mp3");
                        }
                        if(listitem == 12)
                        {
PlayAudioStreamForPlayer(playerid,"http://xsfserver.com/music/sPartyRocking.mp3");
                        }
                        if(listitem == 13)
                        {
PlayAudioStreamForPlayer(playerid,"https://www.dropbox.com/s/6m645w34tmpzh9z/07%20%20%20Xeg%20%28feat%20Praga%29%20%20%20Musica%20%28Vis%C3%A3o%20Clara%29.mp3?dl=1");
						}
                        if(listitem == 14)
                        {
PlayAudioStreamForPlayer(playerid,"Music Stoped");
						}
						return 1;
			  }
	}
Reply
#5

You can't detect if a track ended, but one way is like creating a variable for each song that contains the length of the song (seconds) then you create another variable for each player that stores the seconds that the song was played for and then you check if the player's seconds variable equals or is higher than the song's seconds variable, if it is then you play the next song and reset the player's seconds variable. That's not too good thing to do lol.
Reply
#6

mmh ookay
wow it's the only way ? Gosh ok nvm
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)