Music


Započeo Goku ^, Jul 06, 2021, 14:22:06 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Citat: Dime123 poslato Jul 06, 2021, 18:09:45 POSLE PODNE
Momak je skontao sta ste mu rekli, ali njegov problem je sto kada on pokrene tu pesmu ona radi prvi put, ali drugi, treci i hiljaditi put NECE raditi, jer je pesma obrisana sa servera.
MP3 convert servisi ne cuvaju tu pesmu sto ste konvertovali dugo nego par minuta, zato i radi...   :-X

uploadujes pesme na vocaroo ili negde i pustas taj link sto ce uvek cuvati
sto meni objasnjavas, objasni njemu  ::)

Citat: Luka Nikolic poslato Jul 06, 2021, 18:11:14 POSLE PODNE
sto meni objasnjavas, objasni njemu  ::)
pa tebi jer si to ti napisao a ja sam ti odgovorio na tvoj odgovor

Citat: Dime123 poslato Jul 06, 2021, 18:05:52 POSLE PODNE
Ne mogu tako jer ovo sto ja ocu jeste preko /amusic imas pusti, novo i obrisi, i ja tu dodam i pustam i to na kraj ispadne ovako
PlayAudioStreamForPlayer(players, MusicData[1][musicURL]);
tako da ja ne mogu to tvoje Link itd itd
Daj fDialog za /asmuic

Citat: Fergosonn poslato Jul 06, 2021, 18:57:27 POSLE PODNE
Daj fDialog za /asmuic
Ovo je kad pustam muziku
         case 0:
	    	    {
	    	        if(!strcmp(MusicData[0][musicSongName], "Nema", true)) return SCM(playerid,NS_ORANGE,"* Ovaj slot je prazan.");
	    	        foreach(new players : Player)
					{
					    if (UlogovanProvera[players] == 1)
					    {
					        StopAudioStreamForPlayer(players);
					        PlayAudioStreamForPlayer(players, MusicData[0][musicURL]);
					    }
					}
	    	        new buffer[128];
	    	        format(buffer, sizeof buffer, "(A-MUSIC) "SIVA"A sada zabava uz "IMOVINA"%s"SIVA"! "IMOVINA"[/stopmusic]", MusicData[0][musicSongName]);
	    	        SendClientMessageToAll(NS_IMOVINA, buffer);
	    	    }

a ovo je kad dodajem
fDialog(1006)
{
	    if(response)
	    {
	        format(AddingSongName[playerid], 128, "%s", inputtext);
	        if(strlen(inputtext) > 128 || strlen(inputtext) < 5) return SCM(playerid,NS_ORANGE, "* Ime pesme ne moze biti vece od 128 znakova i manje od 5.");
			printf("[MUZIKA] Add-Music: Player: %s / Slot %d / SongName: %s / URL: %s", GetName(playerid), AddingSongSlot[playerid], AddingSongName[playerid], AddingSongURL[playerid]);
			static gString[100];
			format(gString, sizeof gString, "Dodali ste pesmu %s pod slot %d.", AddingSongName[playerid], AddingSongSlot[playerid]);
			SendClientMessage(playerid,NS_IMOVINA, gString);
			format(MusicData[AddingSongSlot[playerid]][musicSongName], 128, "%s", AddingSongName[playerid]);
			format(MusicData[AddingSongSlot[playerid]][musicURL], 458, "%s", AddingSongURL[playerid]);

			new log[350], buffer[24];
            GetPlayerName(playerid, buffer, 24 + 1);
			format(log, sizeof log, "%s %s je ubacio muziku %s na slot %d.", PlayerInfo[playerid][pImeRanka], buffer, AddingSongName[playerid], AddingSongSlot[playerid]);
	    	Log("Logovi/Muzika/Dodavanje.log", log);

			new musicFile[40];
		    format(musicFile, sizeof musicFile, "Music/ID_%d.ini", AddingSongSlot[playerid]);
			new INI:File = INI_Open(musicFile);
			INI_WriteInt(File, "ID", AddingSongSlot[playerid]);
			INI_WriteString(File, "SongName", AddingSongName[playerid]);
			INI_WriteString(File, "SongURL", AddingSongURL[playerid]);
			INI_Close(File);
		}
	    return 1;
	}

Da si makar malo trazio nasao bi i shvatio sta ti treba.

Prvo treba ti svoj web host i to sa root access (to jest drugim recima VPS/Dedicated)
Skines i instaliras vec napravljenu skriptu (da ne izmisljas toplu vodu)
https://github.com/MichaelBelgium/Youtube-API

Drugo skines i koristis (u krajnjem slucaju modifikujes malo)
https://github.com/MichaelBelgium/MV_Youtube


Sve ovo je pitano 1000 puta po internetu, i ima milion odgovora sa masu resenja.

Citat: Deleted User poslato Jul 06, 2021, 20:33:01 POSLE PODNE
Da si makar malo trazio nasao bi i shvatio sta ti treba.

Prvo treba ti svoj web host i to sa root access (to jest drugim recima VPS/Dedicated)
Skines i instaliras vec napravljenu skriptu (da ne izmisljas toplu vodu)
https://github.com/MichaelBelgium/Youtube-API

Drugo skines i koristis (u krajnjem slucaju modifikujes malo)
https://github.com/MichaelBelgium/MV_Youtube


Sve ovo je pitano 1000 puta po internetu, i ima milion odgovora sa masu resenja.
Vec imam VPS i tu sam proba ali opet samo jednom i nece vise a ovo za API iskreno da ti kazem ne mogu da se bakcem da editujem itd itd itd ako neko zna neki konvert ili ovo za VPS da moze vise puta posto meni oce samo jednom

Citat: Dime123 poslato Jul 06, 2021, 20:44:32 POSLE PODNE
Vec imam VPS i tu sam proba ali opet samo jednom i nece vise a ovo za API iskreno da ti kazem ne mogu da se bakcem da editujem itd itd itd ako neko zna neki konvert ili ovo za VPS da moze vise puta posto meni oce samo jednom
Ako imas vps koji je problem da upload na web space sve sto ti treba? Osim toga ovo sto sam to poslao ne delete nista koliko vidim i cak proverava prvo da ne skida nego ti samo vrati link za postojece fajlove (za ono sto si skinuo i convertovao pre toga)
https://github.com/MichaelBelgium/Youtube-API/blob/02819cd18301f6defca991d899369702286ddecc/convert.php#L31

Oooo kuku mila majko.. Evo ti jos jedan dosta prostiji nacin koji ja koristim :

https://jukehost.co.uk/login?r=/library

Skines mp3 fajl sa yt preko nekog convertera. Zatim upload ovde nakon sto kreiras acc. Kopiras direct link od tvoje zeljene pesme i ubacis pod :

PlayAudioStreamForPlayer( playerid, linkPesme );

Pre nego sto pustis igracu pesmu, moras da zaustavis sa StopAudioStreamForPlayer

Citat: V01D poslato Jul 06, 2021, 21:34:53 POSLE PODNE
Oooo kuku mila majko.. Evo ti jos jedan dosta prostiji nacin koji ja koristim :

https://jukehost.co.uk/login?r=/library

Skines mp3 fajl sa yt preko nekog convertera. Zatim upload ovde nakon sto kreiras acc. Kopiras direct link od tvoje zeljene pesme i ubacis pod :

PlayAudioStreamForPlayer( playerid, linkPesme );

Pre nego sto pustis igracu pesmu, moras da zaustavis sa StopAudioStreamForPlayer
Ponavljam
Ne mogu tako jer ovo sto ja ocu jeste preko /amusic imas pusti, novo i obrisi, i ja tu dodam i pustam i to na kraj ispadne ovako
PlayAudioStreamForPlayer(players, MusicData[1][musicURL]);
tako da ja ne mogu PlayAudioStreamForPlayer( playerid, linkPesme );

Citat: Dime123 poslato Jul 06, 2021, 21:58:19 POSLE PODNE
Ponavljam
Ne mogu tako jer ovo sto ja ocu jeste preko /amusic imas pusti, novo i obrisi, i ja tu dodam i pustam i to na kraj ispadne ovako
PlayAudioStreamForPlayer(players, MusicData[1][musicURL]);
tako da ja ne mogu PlayAudioStreamForPlayer( playerid, linkPesme );

Legenda si..

Ubacis mozda link te pesme u taj array MusicData? Ne razumem u cemu je problem?? Nauci sta je array (niz) i kako se koristi pa ce ti mozda  biti jasno.

Kako to da izgleda??

new broj;
        new urll[128];
        switch(listitem) {

            case 0: { format(urll, sizeof(urll), "%s", Music[0]); broj = 1; } 
            case 1: { format(urll, sizeof(urll), "%s", Music[2]); broj = 3; } 
            case 2: { format(urll, sizeof(urll), "%s", Music[4]); broj = 5; } 
            case 3: { format(urll, sizeof(urll), "%s", Music[6]); broj = 7; } 
            case 4: { format(urll, sizeof(urll), "%s", Music[8]); broj = 9; } 
            case 5: { format(urll, sizeof(urll), "%s", Music[10]); broj = 11; } 
            case 6: { format(urll, sizeof(urll), "%s", Music[12]); broj = 13; } 
            case 7: { format(urll, sizeof(urll), "%s", Music[14]); broj = 15; } 
            case 8: { format(urll, sizeof(urll), "%s", Music[16]); broj = 17; } 
            case 9: { format(urll, sizeof(urll), "%s", Music[18]); broj = 19; } 
            case 10: { format(urll, sizeof(urll), "%s", Music[20]); broj = 21; } 
            case 11: { format(urll, sizeof(urll), "%s", Music[22]); broj = 23; } 
            case 12: { format(urll, sizeof(urll), "%s", Music[24]); broj = 25; } 
        }

        foreach( Player, i ) {
    
            StopAudioStreamForPlayer( i );
            PlayAudioStreamForPlayer( i, urll );
        }


Nesto na ovaj fazon. Na osnovu onoga sto si odabrao u DIALOG_STYLE_LIST, ta pesma ce da se pusti. Izvuce iz niza stream te pesme ( link.mp3 ) i pusti je.

Citat: V01D poslato Jul 06, 2021, 22:32:35 POSLE PODNE
Legenda si..

Ubacis mozda link te pesme u taj array MusicData? Ne razumem u cemu je problem?? Nauci sta je array (niz) i kako se koristi pa ce ti mozda  biti jasno.

Kako to da izgleda??

new broj;
        new urll[128];
        switch(listitem) {

            case 0: { format(urll, sizeof(urll), "%s", Music[0]); broj = 1; } 
            case 1: { format(urll, sizeof(urll), "%s", Music[2]); broj = 3; } 
            case 2: { format(urll, sizeof(urll), "%s", Music[4]); broj = 5; } 
            case 3: { format(urll, sizeof(urll), "%s", Music[6]); broj = 7; } 
            case 4: { format(urll, sizeof(urll), "%s", Music[8]); broj = 9; } 
            case 5: { format(urll, sizeof(urll), "%s", Music[10]); broj = 11; } 
            case 6: { format(urll, sizeof(urll), "%s", Music[12]); broj = 13; } 
            case 7: { format(urll, sizeof(urll), "%s", Music[14]); broj = 15; } 
            case 8: { format(urll, sizeof(urll), "%s", Music[16]); broj = 17; } 
            case 9: { format(urll, sizeof(urll), "%s", Music[18]); broj = 19; } 
            case 10: { format(urll, sizeof(urll), "%s", Music[20]); broj = 21; } 
            case 11: { format(urll, sizeof(urll), "%s", Music[22]); broj = 23; } 
            case 12: { format(urll, sizeof(urll), "%s", Music[24]); broj = 25; } 
        }

        foreach( Player, i ) {
    
            StopAudioStreamForPlayer( i );
            PlayAudioStreamForPlayer( i, urll );
        }


Nesto na ovaj fazon. Na osnovu onoga sto si odabrao u DIALOG_STYLE_LIST, ta pesma ce da se pusti. Izvuce iz niza stream te pesme ( link.mp3 ) i pusti je.
Ma razumem to tvoje itd itd nego sam hteo nesto drugacije da izgleda itd itd ako me razumes i sad kad bi pravio u array morao bih skroz sistem da menjam sve ispocetka

Citat: V01D poslato Jul 06, 2021, 22:32:35 POSLE PODNE
Legenda si..

Ubacis mozda link te pesme u taj array MusicData? Ne razumem u cemu je problem?? Nauci sta je array (niz) i kako se koristi pa ce ti mozda  biti jasno.

Kako to da izgleda??

new broj;
        new urll[128];
        switch(listitem) {

            case 0: { format(urll, sizeof(urll), "%s", Music[0]); broj = 1; } 
            case 1: { format(urll, sizeof(urll), "%s", Music[2]); broj = 3; } 
            case 2: { format(urll, sizeof(urll), "%s", Music[4]); broj = 5; } 
            case 3: { format(urll, sizeof(urll), "%s", Music[6]); broj = 7; } 
            case 4: { format(urll, sizeof(urll), "%s", Music[8]); broj = 9; } 
            case 5: { format(urll, sizeof(urll), "%s", Music[10]); broj = 11; } 
            case 6: { format(urll, sizeof(urll), "%s", Music[12]); broj = 13; } 
            case 7: { format(urll, sizeof(urll), "%s", Music[14]); broj = 15; } 
            case 8: { format(urll, sizeof(urll), "%s", Music[16]); broj = 17; } 
            case 9: { format(urll, sizeof(urll), "%s", Music[18]); broj = 19; } 
            case 10: { format(urll, sizeof(urll), "%s", Music[20]); broj = 21; } 
            case 11: { format(urll, sizeof(urll), "%s", Music[22]); broj = 23; } 
            case 12: { format(urll, sizeof(urll), "%s", Music[24]); broj = 25; } 
        }

        foreach( Player, i ) {
    
            StopAudioStreamForPlayer( i );
            PlayAudioStreamForPlayer( i, urll );
        }


Nesto na ovaj fazon. Na osnovu onoga sto si odabrao u DIALOG_STYLE_LIST, ta pesma ce da se pusti. Izvuce iz niza stream te pesme ( link.mp3 ) i pusti je.
Ovako sam ja pravio
case 10:
	    	    {
                    new strA[248],
			            strB[248],
						glStr[496];
					format(strA, sizeof(strA), "[10] - %s\n[11] - %s\n[12] - %s\n[13] - %s\n[14] - %s\n",
					MusicData[10][musicSongName],MusicData[11][musicSongName],MusicData[12][musicSongName],MusicData[13][musicSongName],MusicData[14][musicSongName]);
					format(strB, sizeof(strB), "[15] - %s\n[16] - %s\n[17] - %s\n[18] - %s\n[19] - %s\n"IMOVINA"Dalje\n"ORANGE"Nazad",
					MusicData[15][musicSongName],MusicData[16][musicSongName],MusicData[17][musicSongName],MusicData[18][musicSongName],MusicData[19][musicSongName]);
					format(glStr, sizeof(glStr), "%s%s",
					strA, strB);
					ShowPlayerDialog(playerid, 1001, DIALOG_STYLE_LIST, ""IMOVINA"Music - Play", glStr, "Play", "Quit");
	    	    }
	    	}
	    }
	}
return 1;
}
fDialog(1001)
{
{
	    if(response)
	    {
	    	switch(listitem)
	    	{
	    	    case 0:
	    	    {
	    	    	if (!strcmp(MusicData[0][musicSongName], "Nema", true)) return SCM(playerid,NS_ORANGE,"* Ovaj slot je prazan.");
	    	        foreach(new players : Player)
					{
					    if (UlogovanProvera[players] == 1)
					    {
					        PlayAudioStreamForPlayer(players, MusicData[10][musicURL]);
					    }
					}
	    	        new buffer[128];
	    	        format(buffer, sizeof buffer, "(A-MUSIC) "SIVA"A sada zabava uz "IMOVINA"%s"SIVA"! "IMOVINA"[/stopmusic]", MusicData[10][musicSongName]);
	    	        SendClientMessageToAll(NS_IMOVINA, buffer);
	    	    }

I tako svih 39 slotova