SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 18/04/2015, 07:02 PM   #1
Jakwob
Huge Clucker
 
Jakwob's Avatar
 
Join Date: Jan 2014
Location: United Kingdom
Posts: 252
Reputation: 27
Default Radio Stations v1.1 - With Menus

Well i originally released the first version here and as i'm am going through my old releases and updating them.

I updated this so it will be easier to use while in the vehicle.

When you are in your vehicle and want a radio station to listen to then just press the key 'N' and a menu will appear, then use the arrow keys to navigate the menu, once you have decided your choice then click the 'W' key and it will select it and you can continue on with what you was doing.

Notice: If you like my work +rep, comment and share.

Features
  • 11 Radio Stations
  • Radio turns off when exiting the vehicle
  • Passenger can hear the radio
  • Menus (not Dialogs)

Radio Stations
  • Dubstep FM
  • Capital FM
  • Pulse Radio
  • Radio Klass Romania
  • Its a Trap Radio
  • Russian Hits Radio
  • Madein Hits Radio
  • Absolute Hits Radio (France)
  • DnB Pirate Radio
  • I Love To Dance Radio
  • Electronic Playground Radio

Screenshot


Its quite a simple script and should be easy to edit the stations

Download:


How To:
Edit Radios:
Find
Code:
        AddMenuItem(Radio, 0, "Dubstep FM");
	AddMenuItem(Radio, 0, "Capital FM");
	AddMenuItem(Radio, 0, "Pulse Radio");
	AddMenuItem(Radio, 0, "Radio Klass Romania");
	AddMenuItem(Radio, 0, "Its a Trap Radio");
	AddMenuItem(Radio, 0, "Russian Hits Radio");
	AddMenuItem(Radio, 0, "Madein Hits Radio");
	AddMenuItem(Radio, 0, "Absolute Hits Radio");
	AddMenuItem(Radio, 0, "DnB Pirate Radio");
	AddMenuItem(Radio, 0, "I Love To Dance Radio");
	AddMenuItem(Radio, 0, "Electronic Playground Radio");
	AddMenuItem(Radio, 0, "Turn Off");
Replace
Code:
        AddMenuItem(Radio, 0, "REPLACE ME"); // case 0
	AddMenuItem(Radio, 0, "REPLACE ME"); // case 1
	AddMenuItem(Radio, 0, "REPLACE ME"); // case 2
	AddMenuItem(Radio, 0, "REPLACE ME"); // case 3
	AddMenuItem(Radio, 0, "REPLACE ME"); // case 4
	AddMenuItem(Radio, 0, "REPLACE ME"); // case 5
	AddMenuItem(Radio, 0, "REPLACE ME"); // case 6
	AddMenuItem(Radio, 0, "REPLACE ME"); // case 7
	AddMenuItem(Radio, 0, "REPLACE ME"); // case 8
	AddMenuItem(Radio, 0, "REPLACE ME"); // case 9
	AddMenuItem(Radio, 0, "REPLACE ME"); // case 10
	AddMenuItem(Radio, 0, "Turn Off"); // case 11
Now find under OnPlayerSelectedMenuRow
Code:
case 0:
{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=40568");
    	SendClientMessage(playerid, -1, "You are tuned into Dubstep FM");
	}
}
case 1:
{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
  		IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "http://media-ice.musicradio.com/CapitalMP3.m3u");
    	SendClientMessage(playerid, -1, "You are tuned into Capital FM");
	}
}
case 2:
{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "http://icy3.abacast.com/pulse87-pulse87mp3-64");
    	SendClientMessage(playerid, -1, "You are tuned into Pulse 87");
	}
}
case 3:
{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=7581");
    	SendClientMessage(playerid, -1, "You are tuned into Radio Klass Romania");
 	}
}
case 4:
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3146548/listen.m3u");
    	SendClientMessage(playerid, -1, "You are tuned into Its a Trap Radio");
	}
}
case 5:
{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/1891409/listen.m3u");
    	SendClientMessage(playerid, -1, "You are tuned into Russian Hits Radio");
	}
}
case 6:
{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3064006/listen.m3u");
    	SendClientMessage(playerid, -1, "You are tuned into Madein Hits Radio");
	}
}
case 7:
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3367058/listen.m3u");
    	SendClientMessage(playerid, -1, "You are tuned into Absolute Hits Radio");
	}
}
case 8:
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3728175/listen.m3u");
    	SendClientMessage(playerid, -1, "You are tuned into DnB Pirate Radio");
	}
}
case 9:
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3710153/listen.m3u");
    	SendClientMessage(playerid, -1, "You are tuned into I Love To Dance Radio");
	}
}
case 10:
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3813588/listen.m3u");
    	SendClientMessage(playerid, -1, "You are tuned into Electronic Playground Radio");
	}
}
case 11:
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = false;
    	StopAudioStreamForPlayer(playerid);
    	SendClientMessage(playerid, -1,"Music off");
	}
}

EXAMPLE
Code:
case 0:
{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "MUSIC URL");
    	SendClientMessage(playerid, -1, "You are tuned into Dubstep FM");
	}
}
case 1:
{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
  		IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "MUSIC URL");
    	SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
	}
}
case 2:
{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "MUSIC URL");
    	SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
	}
}
case 3:
{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "MUSIC URL");
    	SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
 	}
}
case 4:
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "MUSIC URL");
    	SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
	}
}
case 5:
{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "MUSIC URL");
    	SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
	}
}
case 6:
{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "MUSIC URL");
    	SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
	}
}
case 7:
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "MUSIC URL");
    	SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
	}
}
case 8:
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "MUSIC URL");
    	SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
	}
}
case 9:
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "MUSIC URL");
    	SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
	}
}
case 10:
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = true;
    	PlayAudioStreamForPlayer(playerid, "MUSIC URL");
    	SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
	}
}
case 11:
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
    {
    	IsRadioOn[playerid] = false;
    	StopAudioStreamForPlayer(playerid);
    	SendClientMessage(playerid, -1,"Music off");
	}
}

Comment and share if i helped you with what you was looking for.
Suggest if you think other things need adding.

Last edited by Jakwob; 26/05/2015 at 02:53 PM.
Jakwob is offline   Reply With Quote
Old 18/04/2015, 07:22 PM   #2
SpikY_
High-roller
 
SpikY_'s Avatar
 
Join Date: Jul 2014
Location: xSF
Posts: 1,278
Reputation: 128
Default Re: Radio Stations v1.1 - With Menus

Nice
__________________
SpikY_ is offline   Reply With Quote
Old 18/04/2015, 07:36 PM   #3
LazyB0y
Huge Clucker
 
LazyB0y's Avatar
 
Join Date: Feb 2014
Location: Pakistan
Posts: 283
Reputation: 15
Default Re: Radio Stations v1.1 - With Menus

Good Work
__________________
LazyB0y is offline   Reply With Quote
Old 18/04/2015, 07:52 PM   #4
Victory
Little Clucker
 
Victory's Avatar
 
Join Date: Sep 2014
Location: Turkey
Posts: 28
Reputation: 4
Default Re: Radio Stations v1.1 - With Menus

Good job!
Victory is offline   Reply With Quote
Old 18/04/2015, 08:55 PM   #5
SkyFlare
Big Clucker
 
SkyFlare's Avatar
 
Join Date: Apr 2015
Location: NZ
Posts: 83
Reputation: 18
Default Re: Radio Stations v1.1 - With Menus

Nice work!
__________________
Code:
                                                                           🍎-- 
             (•_•)                     (•_•)                  (•_•)       \(•_•)/  
             <) )–| I have a PEN    🍎–( (> I have an APPLE   ~) )~   Ughh  ) )   APPLE PEN
              / \                       / \                    / \          / \
My Work
Link
Information
S-Store System V2 LinkIngame Store in Dialogs
SkyFlare is offline   Reply With Quote
Old 18/04/2015, 10:33 PM   #6
Azula
Huge Clucker
 
Azula's Avatar
 
Join Date: Apr 2015
Location: *-*
Posts: 301
Reputation: 57
Default Re: Radio Stations v1.1 - With Menus

pastbin link please
Azula is offline   Reply With Quote
Old 19/04/2015, 02:43 AM   #7
tantri
Big Clucker
 
Join Date: Mar 2015
Posts: 59
Reputation: 4
Default Re: Radio Stations v1.1 - With Menus

can i add my song?
tantri is offline   Reply With Quote
Old 19/04/2015, 03:20 PM   #8
Jakwob
Huge Clucker
 
Jakwob's Avatar
 
Join Date: Jan 2014
Location: United Kingdom
Posts: 252
Reputation: 27
Default Re: Radio Stations v1.1 - With Menus

@tantri i have updated the topic to include a "How To:" section, so it should be easier for everyone to edit.
@Azula I will add pastebin soon

Thanks guys for the comments
Jakwob is offline   Reply With Quote
Old 19/04/2015, 03:44 PM   #9
LeXuZ
Huge Clucker
 
Join Date: Oct 2014
Location: United Kingdom
Posts: 308
Reputation: 12
Default Re: Radio Stations v1.1 - With Menus

Nice work
LeXuZ is offline   Reply With Quote
Old 20/04/2015, 06:03 PM   #10
Smocky
Huge Clucker
 
Smocky's Avatar
 
Join Date: Sep 2014
Location: Forum SA:MP
Posts: 285
Reputation: 1
Default Re : Radio Stations v1.1 - With Menus

Nice.
__________________
▁ ▂ ▄ ▅ ▆ ▇ █ мεs яéαℓιsαтιση █ ▇ ▆ ▅ ▄ ▂ ▁

ғιℓтεяscяιρтs

[FilterScript]Système de Téléportation
[FilterScript]Systèmes MP3

gαмε-мσ∂ε

[Game-Mode]Cops And Robbers [NSACNR]
[Game-Mode]Derby Traduit
Smocky is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] 2K-Radio : Dynamic Radio Stations! 2KY Filterscripts 18 31/01/2015 05:41 PM
Radio Stations Pillhead2007 Scripting Help 1 01/08/2014 01:59 PM
Radio stations for /radio command! Help me!!! Goldino Scripting Help 3 13/12/2012 07:57 PM


All times are GMT. The time now is 09:29 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.