Jump to content

Question

Posted

uitati astea sunt erorile care le primesc

C:\Users\And\Desktop\samp03x_svr_R1-2_win32\filterscripts\MP3.pwn(70) : error 014: invalid statement; not in switch
C:\Users\And\Desktop\samp03x_svr_R1-2_win32\filterscripts\MP3.pwn(70) : warning 215: expression has no effect
C:\Users\And\Desktop\samp03x_svr_R1-2_win32\filterscripts\MP3.pwn(70) : error 001: expected token: ";", but found ":"
C:\Users\And\Desktop\samp03x_svr_R1-2_win32\filterscripts\MP3.pwn(70) : error 029: invalid expression, assumed zero
C:\Users\And\Desktop\samp03x_svr_R1-2_win32\filterscripts\MP3.pwn(70) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
iar acesta este fs-ul :
#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Radio System is starting ..");
    print(" Radio system has started.");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    print("\n--------------------------------------");
    print(" Radio System has been shut down due to a Filterscript unload/Exit.");
    print("--------------------------------------\n");
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Radio Tutorial by SaSWeB. Powered by SaSWeB Tutorials ");
    print("----------------------------------\n");
}

#endif


public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/rmusic", cmdtext, true, 10) == 0) //Change this one to whatever you want.
    {
        ShowPlayerDialog(playerid,90,DIALOG_STYLE_LIST,"{F81414}Radio PcSNeT:","{3399ff}\n{3399ff}1){FFFFFF}ProFM\n{3399ff}2){FFFFFF}Radio Party\n{3399ff}3){FFFFFF}Radio Greu de Difuzat\n{3399ff}4){FFFFFF}Radio Gangsta Manele\n{3399ff}5){FFFFFF}Radio AzNetGalati", "Select", "Exit");
        //We use the line above to make the Dialog show, and as you notice we want DIALOG_STYLE_LIST because it will be a list so we can choose from.
        //As you notice everytime you add \r\n it adds a new line to the list, which means in our tutorial adds a new radio station to the list.
        //Make sure you change the ID of the Dialog, we don't want it to mix with other dialogs in your server, I set it to 90.
        return 1;
    }
    if (strcmp("/stopradio", cmdtext, true, 10) == 0)
    {
        StopAudioStreamForPlayer(playerid);//This is the function we need to stop the audio from streaming the music.
    	SendClientMessage(playerid, 0x42F3F198, "Ai oprit Radio-ul.");
        return 1;
    }
    return 0;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case 90: //Dont Remove This one
        {
            if(!response)// This is When Player Choose "Cancel"
            {
                    SendClientMessage(playerid, 0x42F3F198, "Ai inchis Radio!");//This one sends a message when you close the dialog using (Cancel).
                    return 1;
            }

            switch(listitem)//Lists And Radio Steaming Locations...
			{

                }
            case 1: // ProFM ;
                {
                    PlayAudioStreamForPlayer(playerid, "http://stream.profm.ro:8012/profm.mp3");
                    SendClientMessage(playerid, 0x42F3F198, "Te-ai conectat la ProFM, Scrie /stopradio pentru a inchide Radio-ul.");
                }
            case 2: // Radio Party
                {
                    PlayAudioStreamForPlayer(playerid, "http://live.activeradio.ro:9000/listen.pls");
                    SendClientMessage(playerid, 0x42F3F198, "Te-ai conectat la Radio Party, Scrie /stopradio pentru a inchide Radio-ul.");
                }
             case 3: // Radio AzNetGalati
                {
                    PlayAudioStreamForPlayer(playerid, "http://http://www.aznetgalati.tk:8800");
                    SendClientMessage(playerid, 0x42F3F198, "Te-ai conectat la Radio AzNetGalati, Scrie /stopradio pentru a inchide Radio-ul.");
                }
               case 4: // Radio Manele
                {
                    PlayAudioStreamForPlayer(playerid, "http://live.radiogangsta.ro:8800");
                    SendClientMessage(playerid, 0x42F3F198, "Te-ai conectat la Radio Gangsta Manele, Scrie /stopradio pentru a inchide Radio-ul.");
                }
              

                
                }
            }
        }
   
    //return 1;

2 answers to this question

Recommended Posts

Posted
//______________________________________________________________________________

#include                                                               " a_samp"

//______________________________________________________________________________

public OnPlayerCommandText ( playerid , cmdtext [ ] )

{

    if ( strcmp ( "/radio" , cmdtext , true , 10 ) == 0 )
    
    {
    
        #define SPD  ShowPlayerDialog
    
        SPD ( playerid , 90 , DIALOG_STYLE_LIST , "{F81414}Radio PcSNeT:" ,

		 "{3399ff}\n{3399ff}1){FFFFFF}ProFM\n{3399ff}2){FFFFFF}Radio Party\n{3399ff}3){FFFFFF}Radio Greu de Difuzat\n{3399ff}4){FFFFFF}Radio Gangsta Manele\n{3399ff}5){FFFFFF}Radio AzNetGalati" , "Select" , "Exit" ) ;

		return ( 1 ) ;

    }
    
    if ( strcmp ( "/stopradio" , cmdtext , true , 10 ) == 0 )
    
    {
    
        StopAudioStreamForPlayer ( playerid ) ;
        
        return ( 1 ) ;
        
    }
    
    return ( 0 ) ;
    
}

//______________________________________________________________________________

public OnDialogResponse ( playerid , dialogid , response , listitem , inputtext [ ] )

{

    switch ( dialogid )
    
    {
    
        case 90 :
        
        {
        
            if ( !response )
            
            {
            
				return ( 1 ) ;

            }

            switch ( listitem )
            
			{

            	case 1 :
            	
                {
                
                    PlayAudioStreamForPlayer ( playerid , "http://stream.profm.ro:8012/profm.mp3" ) ;
                    
                }
                
            	case 2 :
            	
                {
                
                    PlayAudioStreamForPlayer ( playerid , "http://live.activeradio.ro:9000/listen.pls" ) ;
                    
                }
                
             	case 3 :

				{

                    PlayAudioStreamForPlayer ( playerid , "http://http://www.aznetgalati.tk:8800" ) ;
                    
                }
                
               	case 4 :
               	
                {
                
                    PlayAudioStreamForPlayer ( playerid , "http://live.radiogangsta.ro:8800" ) ;
                    
                }
                
            }

			return ( 1 ) ;
            
        }

	}

	return ( 0 ) ;

}

//______________________________________________________________________________

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.