Radio Help
#9

#include <a_samp>
#define RELEASED(%0) \
(((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))

#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

//-------------------------------------------------

public OnFilterScriptInit()
{
return 1;
}
//-------------------------------------------------

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys & KEY_ANALOG_RIGHT)) {
if(IsPlayerInVehicle (playerid))
{
PlayAudioStreamForPlayer(playerid, "http://stream.profm.ro:8012/profm.mp3");
SendClientMessage(playerid, 0xFF330000, "Ascultati: Radio Pro Fm");
}
else if ((newkeys & KEY_ANALOG_LEFT)) {
PlayAudioStreamForPlayer(playerid, "http://asculta.radiotaraf.com:7100/");
SendClientMessage(playerid, 0xFF330000, "Ascultati: Radio Taraf ");
}
} else if ((newkeys & KEY_ANALOG_DOWN)) {

PlayAudioStreamForPlayer(playerid, "http://live.radiomillenium.ro:9000");
SendClientMessage(playerid, 0xFF330000, "Ascultati: Radio Milenium");
}
if ((newkeys & KEY_ANALOG_UP)) {

PlayAudioStreamForPlayer(playerid, "http://92.114.63.81:9978/");
SendClientMessage(playerid, 0xFF330000, "Ascultati: Radio Party");
}
else if ((newkeys & KEY_RIGHT)) {
PlayAudioStreamForPlayer(playerid, "http://stream.radiozu.ro:8020/");
SendClientMessage(playerid, 0xFF330000, "Ascultati: Radio ZU");
}
return 1;
}
//-------------------------------------------------

public OnPlayerUpdate(playerid)
{
if(!IsPlayerConnected(playerid)) return 0;
if(IsPlayerNPC(playerid)) return 1;

// Handle playing SomaFM at the alhambra
if(GetPlayerInterior(playerid) == 17) {
if(IsPlayerInRangeOfPoint(playerid,70.0,489.5824,-14.7563,1000.6797)) { // alhambra middle
if(!GetPVarInt(playerid,"alhambra")) {
SetPVarInt(playerid,"alhambra",1);
PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls",480.9575,-3.5402,1002.0781,40.0);
}
}
}
else {
if(GetPVarInt(playerid,"alhambra")) {
DeletePVar(playerid,"alhambra");
StopAudioStreamForPlayer(playerid);
}
}

return 1;
}

i want to press right analog for all of them ... but i want all of them to change
Reply


Messages In This Thread
Radio Help - by Dan_Barocu - 05.01.2012, 09:54
Re: Radio Help - by Dan_Barocu - 05.01.2012, 10:16
Re: Radio Help - by FuTuяe - 05.01.2012, 10:18
Re: Radio Help - by Dan_Barocu - 05.01.2012, 10:48
Re: Radio Help - by FuTuяe - 05.01.2012, 10:56
Re: Radio Help - by Dan_Barocu - 05.01.2012, 11:03
Re: Radio Help - by Dan_Barocu - 05.01.2012, 12:21
Re: Radio Help - by Dan_Barocu - 05.01.2012, 12:24
Re: Radio Help - by Dan_Barocu - 05.01.2012, 12:33

Forum Jump:


Users browsing this thread: 1 Guest(s)