Problem with boombox, setstation
#1

When I use this command but the item doesn't play any song. I don't know how to configuration it, some one help me please
PHP код:
else if(dialogid == SETSTATION)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                if(!
GetPVarType(playerid"pHTTPWait"))
                {
                    
SetPVarInt(playerid"pHTTPWait"1);
                    
format(stringsizeof(string), "%s/radio/radio.php?listgenres=1"SAMP_WEB);
                    
HTTP(playeridHTTP_GETstring"""GenreHTTP");
                }
                else
                {
                    
SendClientMessage(playerid0xFFFFFFAA"HTTP Thread is busy");
                }
            }
            else if(
listitem == 1)
            {
                if(!
GetPVarType(playerid"pHTTPWait"))
                {
                    
SetPVarInt(playerid"pHTTPWait"1);
                    
format(stringsizeof(string), "%s/top100/Nhac-Tre/IWZ9Z088.html"SAMP_WEB);
                    
HTTP(playeridHTTP_GETstring"""Top50HTTP");
                }
                else
                {
                    
SendClientMessage(playerid0xFFFFFFAA"HTTP Thread is busy");
                }
            }
            else if(
listitem == 2)
            {
                
ShowPlayerDialog(playerid,STATIONSEARCH,DIALOG_STYLE_INPUT,"Station Search","Input a search criteria:","Search","Quay lai");
            }
            else if(
listitem == 3)
            {
                if(
IsPlayerInAnyVehicle(playerid))
                {
                     foreach(new 
iPlayer)
                    {
                        if(
GetPlayerVehicleID(i) != && GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid)) {
                            
//PlayAudioStreamForPlayerEx(i, "http://shoutcast.ng-gaming.net:8000/listen.pls?sid=1");
                        
}
                      }
                      
//format(stationidv[GetPlayerVehicleID(playerid)], 64, "%s", "http://shoutcast.ng-gaming.net:8000/listen.pls?sid=1");
                      
format(stringsizeof(string), "* %s changes the radio station."GetPlayerNameEx(playerid), string);
                    
ProxDetector(10.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                }
                else if(
GetPVarType(playerid"pBoomBox"))
                {
                    foreach(new 
iPlayer)
                    {
                        if(
IsPlayerInDynamicArea(iGetPVarInt(playerid"pBoomBoxArea")))
                        {
                            
//PlayAudioStreamForPlayerEx(i, "http://shoutcast.ng-gaming.net:8000/listen.pls?sid=1", GetPVarFloat(playerid, "pBoomBoxX"), GetPVarFloat(playerid, "pBoomBoxY"), GetPVarFloat(playerid, "pBoomBoxZ"), 30.0, 1);
                          
}
                      }
                      
//SetPVarString(playerid, "pBoomBoxStation", "http://shoutcast.ng-gaming.net:8000/listen.pls?sid=1");
                
}
                else
                {
                   
// PlayAudioStreamForPlayerEx(playerid, "http://shoutcast.ng-gaming.net:8000/listen.pls?sid=1");
                   // SetPVarInt(playerid, "MusicIRadio", 1);
                
}
            }
            else if(
listitem == 4)
            {
                if(
IsPlayerInAnyVehicle(playerid))
                {
                     foreach(new 
iPlayer)
                     {
                         if(
GetPlayerVehicleID(i) != && GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid)) {
                            
//PlayAudioStreamForPlayerEx(i, "http://nick.ng-gaming.net:8000/listen.pls");
                        
}
                    }
                  
//    format(stationidv[GetPlayerVehicleID(playerid)], 64, "%s", "http://nick.ng-gaming.net:8000/listen.pls");
                      
format(stringsizeof(string), "* %s changes the radio station."GetPlayerNameEx(playerid), string);
                    
ProxDetector(10.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                }
                else if(
GetPVarType(playerid"pBoomBox"))
                {
                    foreach(new 
iPlayer)
                    {
                        if(
IsPlayerInDynamicArea(iGetPVarInt(playerid"pBoomBoxArea")))
                        {
                        
//    PlayAudioStreamForPlayerEx(i, "http://nick.ng-gaming.net:8000/listen.pls", GetPVarFloat(playerid, "pBoomBoxX"), GetPVarFloat(playerid, "pBoomBoxY"), GetPVarFloat(playerid, "pBoomBoxZ"), 30.0, 1);
                          
}
                      }
                  
//    SetPVarString(playerid, "pBoomBoxStation", "http://nick.ng-gaming.net:8000/listen.pls");
                
}
                else
                {
                
//    PlayAudioStreamForPlayerEx(playerid, "http://nick.ng-gaming.net:8000/listen.pls");
                 //   SetPVarInt(playerid, "MusicIRadio", 1);
                
}
            }
            else if(
listitem == 5)
            {
                if(
GetPVarType(playerid"pBoomBox"))
                {
                    
SendClientMessageEx(playeridCOLOR_GRAD1"Sorry, this feature is for the MP3 Player or vehicles only.");
                }
                if(
IsPlayerInAnyVehicle(playerid))
                {
                    
SendClientMessageEx(playeridCOLOR_GRAD1"You must be using your MP3 to use this feature.");
                }
                else
                {
                    
ShowPlayerDialog(playeridCUSTOM_URLCHOICEDIALOG_STYLE_INPUT"Custom URL""Please insert a valid audio url stream.""Dong y""Quay lai");
                }
            }
            else if(
listitem == 6)
            {
                if(!
IsPlayerInAnyVehicle(playerid))
                {
                    if(
GetPVarType(playerid"pBoomBox"))
                    {
                        
SendClientMessage(playeridCOLOR_WHITE"You have turned off the boom box.");
                        foreach(new 
iPlayer)
                        { if(
IsPlayerInDynamicArea(iGetPVarInt(playerid"pBoomBoxArea"))) StopAudioStreamForPlayerEx(i); }
                          
DeletePVar(playerid"pBoomBoxStation");
                    }
                    else
                    {
                        
StopAudioStreamForPlayerEx(playerid);
                    }
                }
                  else
                  {
                      
format(stringsizeof(string), "* %s turns off the radio."GetPlayerNameEx(playerid), string);
                    
ProxDetector(10.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    foreach(new 
iPlayer)
                    {
                        if(
GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid)) {
                            
StopAudioStreamForPlayerEx(i);
                          }
                    }
                       
stationidv[GetPlayerVehicleID(playerid)][0] = 0;
                }
            }
        }
    } 
Reply


Messages In This Thread
Problem with boombox, setstation - by Bumie - 09.07.2015, 09:57
Re: Problem with boombox, setstation - by Bumie - 14.07.2015, 15:41
Re: Problem with boombox, setstation - by Virtual1ty - 14.07.2015, 17:41
Re: Problem with boombox, setstation - by Bumie - 15.07.2015, 05:37
Re: Problem with boombox, setstation - by Virtual1ty - 15.07.2015, 12:06
Re: Problem with boombox, setstation - by Bumie - 16.07.2015, 06:56
Re: Problem with boombox, setstation - by XBrianX - 16.07.2015, 12:25

Forum Jump:


Users browsing this thread: 1 Guest(s)