Radio Problem - 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: Radio Problem (
/showthread.php?tid=499649)
Radio Problem -
coolmark1995 - 09.03.2014
hello I have made the radio script below but I was wondering how do I add a selection to go back to the original gta sa radio?
Код:
// Music stream fs by AaronKillz
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Music FS by coolmark1995");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
CMD:radio(playerid, params[])
{
ShowPlayerDialog(playerid, 12345, DIALOG_STYLE_LIST, "Pick a music station", "Country108\ndubstep.fm\nB98 Today's Best Country\nNashville FM", "Choose", "Cancel");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid) {
case 12345:
{
if(!response) return SendClientMessage(playerid, 0xFF330000, "No music selected.");
switch(listitem) {
case 0:
{
PlayAudioStreamForPlayer(playerid, "http://tuner.country108.com/listen.pls");
return 1;
}
case 1:
{
PlayAudioStreamForPlayer(playerid, "http://dubstep.fm/listen.pls");
return 1;
}
case 2:
{
PlayAudioStreamForPlayer(playerid, "http://uplink.duplexfx.com:8018/listen.pls");
return 1;
}
case 3:
{
PlayAudioStreamForPlayer(playerid, "http://server-14.stream-server.nl:8300/listen.pls");
return 1;
}
}
}
}
return 1;
}
Re: Radio Problem -
Stinged - 09.03.2014
https://sampwiki.blast.hk/wiki/StopAudioStreamForPlayer
Re: Radio Problem -
coolmark1995 - 09.03.2014
Quote:
Originally Posted by Stinged
|
sorry im kinda a new scripter how would I make it so a thing to stop stream appears in menu
Re: Radio Problem -
Stinged - 09.03.2014
pawn Код:
CMD:radio(playerid, params[])
{
ShowPlayerDialog(playerid, 12345, DIALOG_STYLE_LIST, "Pick a music station", "Country108\ndubstep.fm\nB98 Today's Best Country\nNashville FM"\nStop the music, "Choose", "Cancel");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case 12345:
{
if(!response) return SendClientMessage(playerid, 0xFF330000, "No music selected.");
switch(listitem)
{
case 0:
{
PlayAudioStreamForPlayer(playerid, "http://tuner.country108.com/listen.pls");
return 1;
}
case 1:
{
PlayAudioStreamForPlayer(playerid, "http://dubstep.fm/listen.pls");
return 1;
}
case 2:
{
PlayAudioStreamForPlayer(playerid, "http://uplink.duplexfx.com:8018/listen.pls");
return 1;
}
case 3:
{
PlayAudioStreamForPlayer(playerid, "http://server-14.stream-server.nl:8300/listen.pls");
return 1;
}
case 4:
{
StopAudioStreamForPlayer(playerid);
return 1;
}
}
}
}
return 1;
}
Re: Radio Problem -
coolmark1995 - 09.03.2014
thanks alot man
Re: Radio Problem -
coolmark1995 - 09.03.2014
Nevermind fixed