SA-MP Forums Archive
How to add more custom radio music on bomboox or setstaion - 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: How to add more custom radio music on bomboox or setstaion (/showthread.php?tid=506322)



How to add more custom radio music on bomboox or setstaion - jesdynguyen - 12.04.2014

how to add more custom radio chanel on my boombox or /setstation

I saw NGG have a search when you press the key word they will found a lot of list radio music to hear or news , how to edit that sprits , help me

this is example for my code


else if(listitem == 2)
{
if(IsPlayerInAnyVehicle(playerid))
{
foreach(Player, i) if(GetPlayerVehicleID(i) != 0 && GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid)) {
PlayAudioStreamForPlayerEx(i, "http://www.powerhitz.com/ph.pls");
}
format(stationidv[GetPlayerVehicleID(playerid)], 64, "%s", "http://www.powerhitz.com/ph.pls");
format(string, sizeof(string), "* %s changes the radio station.", GetPlayerNameEx(playerid), string);
ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
else if(GetPVarType(playerid, "pBoomBox"))
{
foreach(Player, i)
{
if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "pBoomBoxArea")))
{
PlayAudioStreamForPlayerEx(i, "http://www.powerhitz.com/ph.pls", GetPVarFloat(playerid, "pBoomBoxX"), GetPVarFloat(playerid, "pBoomBoxY"), GetPVarFloat(playerid, "pBoomBoxZ"), 30.0, 1);
}
}
SetPVarString(playerid, "pBoomBoxStation", "http://www.powerhitz.com/ph.pls");
}
else
{
PlayAudioStreamForPlayerEx(playerid, "http://www.powerhitz.com/ph.pls");
SetPVarInt(playerid, "MusicIRadio", 1);
}
}


Re: How to add more custom radio music on bomboox or setstaion - Mattakil - 12.04.2014

pawn Код:
else if(listitem == 2)//change this to the list item, the next one would be 3, 4 etc.
{
if(IsPlayerInAnyVehicle(playerid))
{
foreach(Player, i) if(GetPlayerVehicleID(i) != 0 && GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid)) {
PlayAudioStreamForPlayerEx(i, "http://www.powerhitz.com/ph.pls"); //change to the new URL
}
format(stationidv[GetPlayerVehicleID(playerid)], 64, "%s", "http://www.powerhitz.com/ph.pls"); //change to the new URL
format(string, sizeof(string), "* %s changes the radio station.", GetPlayerNameEx(playerid), string);
ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(GetPVarType(playerid, "pBoomBox"))
{
foreach(Player, i)
{
if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "pBoomBoxArea")))
{
PlayAudioStreamForPlayerEx(i, "http://www.powerhitz.com/ph.pls", GetPVarFloat(playerid, "pBoomBoxX"), //Once again, change the URLGetPVarFloat(playerid, "pBoomBoxY"), GetPVarFloat(playerid, "pBoomBoxZ"), 30.0, 1);
}
}
SetPVarString(playerid, "pBoomBoxStation", "http://www.powerhitz.com/ph.pls"); //pretty sure you get it by now
}
else
{
PlayAudioStreamForPlayerEx(playerid, "http://www.powerhitz.com/ph.pls"); //and here
SetPVarInt(playerid, "MusicIRadio", 1);
}
}