Hello there, i'm using an radio system for live radio feeds, but when i set the radio station it dosent play the music, this is how the script looks like, any idea what plugin i need and what not?
Код:
CMD:setstation(playerid, params[]) {
if(!IsPlayerInAnyVehicle(playerid)) {
return SendClientMessageEx(playerid, COLOR_GRAD2, "You must be in a car to use a car radio.");
}
else if(isnull(params)) {
SendClientMessageEx(playerid, COLOR_GRAD2, "USAGE: /setstation [station] (0 - 3)");
SendClientMessageEx(playerid, COLOR_GRAD2, "(0) Stop Radio (1) Hot 108 Jamz - (2) Los Santos Radio - (3) #1 Stop for Hip Hop");
return 1;
}
new string[128], station[256];
switch(strval(params)) {
case 0: {
format(string, sizeof(string), "%s turns off the radio.",GetPlayerNameEx(playerid));
foreach(Player, i) if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid)){
StopAudioStreamForPlayer(i);
//stationidp[i] = 0;
stationidv[GetPlayerVehicleID(playerid)] = 0;
}
}
case 1: {
format(string, sizeof(string), "%s changes the station to Hot 108 Jamz.",GetPlayerNameEx(playerid));
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1281016");
stationidv[GetPlayerVehicleID(playerid)] = 1;
}
case 2: {
format(string, sizeof(string), "%s changes the station to Los Santos Radio.",GetPlayerNameEx(playerid));
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1280356");
stationidv[GetPlayerVehicleID(playerid)] = 2;
}
case 3: {
format(string, sizeof(string), "%s changes the station to #1 stop for Hip Hop",GetPlayerNameEx(playerid));
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1269052");
stationidv[GetPlayerVehicleID(playerid)] = 3;
}
default: return SendClientMessageEx(playerid, COLOR_GRAD2, "Invalid station specified.");
}
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
foreach(Player, i) if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid) && Audio_IsClientConnected(i)) {
Audio_Stop(i, stationidp[i]);
stationidp[i] = Audio_PlayStreamed(i, station, false, true, false);
Audio_SetVolume(i, stationidp[i], 30);
}
return 1;
}
It has nothing to do with plugins, its just your links, have you actually tried to put them in your browser get the file and play it in an audio player ?