SA-MP Forums Archive
music wont play! rep ++ - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: music wont play! rep ++ (/showthread.php?tid=336184)



music wont play! rep ++ - oscar7610 - 21.04.2012

public OnPlayerConnect(playerid)
{

PlayAudioStreamForPlayer(playerid, "http://speedy.sh/MEwMK/The-Godfather-Theme-Song.mp3");
return 1;
}

public OnPlayerSpawn(playerid)
{
StopAudioStreamForPlayer(playerid);
return 1;
}

Music wont play.


Re: music wont play! rep ++ - oscar7610 - 21.04.2012

Код:
Quote:
Originally Posted by oscar7610 Посмотреть сообщение
public OnPlayerConnect(playerid) { PlayAudioStreamForPlayer(playerid, "http://speedy.sh/MEwMK/The-Godfather-Theme-Song.mp3"); return 1; } public OnPlayerSpawn(playerid) { StopAudioStreamForPlayer(playerid); return 1; }
Quote:
Originally Posted by oscar7610
Посмотреть сообщение
Music wont play.



Re: music wont play! rep ++ - Mr.Tony - 21.04.2012

is it a filter script or a gamemode, because if it's in a filterscript it may wont play because your gamemode is using the same functions.


Re: music wont play! rep ++ - Roel - 21.04.2012

nvm my mistake


Re: music wont play! rep ++ - oscar7610 - 21.04.2012

No its not a FS. Any good site to upload? music.


Re: music wont play! rep ++ - DarkB0y - 21.04.2012

see this one https://sampforum.blast.hk/showthread.php?tid=305707


Re: music wont play! rep ++ - oscar7610 - 21.04.2012

No I just want it when player is connected its plays a simple music then when he spawns it stops.


Re: music wont play! rep ++ - Ainseri - 21.04.2012

Go to the URL. Does music immediately pop up in your browser's download manager or start playing? No. The URL you linked to isn't an MP3 file (although it appears as one), it's a web page of a free file host for you to download it. You need to use a direct link (http://speedy.sh/MEwMK/download/The-...Theme-Song.mp3) or better; upload it to an FTP.


Re: music wont play! rep ++ - oscar7610 - 21.04.2012

Quote:
Originally Posted by Ainseri
Посмотреть сообщение
Go to the URL. Does music immediately pop up in your browser's download manager or start playing? No. The URL you linked to isn't an MP3 file (although it appears as one), it's a web page of a free file host for you to download it. You need to use a direct link (http://speedy.sh/MEwMK/download/The-...Theme-Song.mp3) or better; upload it to an FTP.
Yes music pops but it dont play. even this wont work.

http://k003.kiwi6.com/hotlink/wltvsc...menu_intro.mp3.

Tried the one from samp wiki it worked.


Re: music wont play! rep ++ - Avi57 - 21.04.2012

use this:
Код:
#include <a_samp>

#define FILTERSCRIPT
#define radiodialog 1


public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp(cmdtext, "/radio", true) == 0)
{
    ShowPlayerDialog(playerid, radiodialog, DIALOG_STYLE_LIST, "Radio Stations", "{C76114}Stop Music\nILoveRadio\nLite FM", "Listen", "Cancel");
}
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == radiodialog)
    {
        if(response)
        {
		    if(listitem == 0)
			{
			    StopAudioStreamForPlayer(playerid);
            }
            if(listitem == 1)
			{
			    PlayAudioStreamForPlayer(playerid, "http://iloveradio.de/listen.m3u");
			}
			if(listitem == 2)
			{
			    PlayAudioStreamForPlayer(playerid, "http://litefm/live.m3u");//add your radio station
			}
		}
        return 1;
    }
    return 0;
}
Hope it helps You