Posts: 265
Threads: 69
Joined: Feb 2012
Reputation:
0
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.
Posts: 497
Threads: 39
Joined: Feb 2012
Reputation:
0
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.
Posts: 265
Threads: 69
Joined: Feb 2012
Reputation:
0
No its not a FS. Any good site to upload? music.
Posts: 265
Threads: 69
Joined: Feb 2012
Reputation:
0
No I just want it when player is connected its plays a simple music then when he spawns it stops.
Posts: 701
Threads: 91
Joined: Mar 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