Help.
#1

So yeah.

Done a lot in my script lately. Now, I am script a MP3 Player streaming into my script.

So I done everything and compiled without any errors but when I am in-game, I do /radio in the vehicle.
It brings up the dialogs and I click on the station but the music doesn't play.

Here are the codes I have.

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case DIALOG_RADIO:
        {
            if(!response)
            {
                    SendClientMessage(playerid, COLOR_BRIGHTRED, "INFO: You canceled the radio station");
                    return 1;
            }

            switch(listitem)
            {
                case 0:
                {
                    PlayAudioStreamForPlayer(playerid, "http://www.hot108.com/hot108live.html");
                    SendClientMessage(playerid, COLOR_BRIGHTRED, "INFO: Your vehicle's radio is now playing.");
                }
                case 1:
                {
                    PlayAudioStreamForPlayer(playerid, "");
                    SendClientMessage(playerid, COLOR_BRIGHTRED, "INFO: Your vehicle's radio is now playing.");

                }
                case 2:
                {
                    PlayAudioStreamForPlayer(playerid, "");
                    SendClientMessage(playerid, COLOR_BRIGHTRED, "INFO: Your vehicle's radio is now playing.");
                }

            }
        }
    }
    return 1;
}
pawn Код:
//--------------------------------[COMMANDS]------------------------------------
CMD:radio(playerid, params[])
{
         if(IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, -1, "You need to be in a vehicle to use this command!");
         ShowPlayerDialog(playerid, DIALOG_RADIO,DIALOG_STYLE_LIST,"Radio Stations","1. 95.3 FM\r\n2. 92.5 FM\r\n3. 101.1 FM","Select", "Cancel");
         return 1;
    }
CMD:offradio(playerid, params[])
{
        if(IsPlayerInAnyVehicle(playerid))
        StopAudioStreamForPlayer(playerid);
        return 1;
    }
Is there something wrong in the coding? Please help.
Reply


Messages In This Thread
Help. - by Nicholas. - 16.02.2012, 20:23
Re: Help. - by Twisted_Insane - 16.02.2012, 20:27
Re: Help. - by 2KY - 16.02.2012, 20:28
Re: Help. - by Nicholas. - 16.02.2012, 20:44
Re: Help. - by Nicholas. - 16.02.2012, 23:21
Re: Help. - by 2KY - 16.02.2012, 23:23
Re: Help. - by Nicholas. - 16.02.2012, 23:33
Re: Help. - by Nicholas. - 17.02.2012, 00:26
Re: Help. - by Nicholas. - 17.02.2012, 02:34
Re: Help. - by iggy1 - 17.02.2012, 02:45

Forum Jump:


Users browsing this thread: 1 Guest(s)