Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #if defined CREDITS
- Salut ! Vad ca esti incepator .
- ________________________________________________________________________________
- Aici iti voi explica functii de mai jos :
- ________________________________________________________________________________
- switch( dialogid ) - l-am folosit mai jos deoarece da o rapiditate dialogului .
- ________________________________________________________________________________
- switch - se foloseste de exemplu :
- ________________________________________________________________________________
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch( dialogid )
- {
- case DIALOG_RADIO:
- {
- if(response)
- {
- switch( listitem )
- {
- case 0: SencClientMessage( playerid , -1 , "Bine ai venit la un mic tutorial !" );
- case 1: SendClientMessage( playerid , -1 , "Aici iti voi explica niste functii ");
- }
- }
- return 1;
- }
- return 0;
- }
- ________________________________________________________________________________
- strcat - se foloseste de obicei cand vrei sa scrii ceva .
- ________________________________________________________________________________
- new
- string[ 1200 ];
- ________________________________________________________________________________
- strcat( string , sizeof string, "Sper ca ai inteles ceva pana acum din acest mini tutorial\n", 1200 );
- ________________________________________________________________________________
- PlayAudioStreamForPlayer - porneste muzica pentru un player xD
- ________________________________________________________________________________
- PlayAudioStreamForPlayer( playerid , "link.mp3" );
- ________________________________________________________________________________
- SendClientMessage - trimite unui player un mesaj
- ________________________________________________________________________________
- SendClientMessage( playerid , -1 , "Welcome To The Server Mr" );
- ________________________________________________________________________________
- SendClientMessageToAll - trimite tuturor playerilor un mesaj dar si in consola
- ________________________________________________________________________________
- SendClientMessageToAll( playerid , -1 , "Ownerul acestui radio sistem este necunoscut" );
- ________________________________________________________________________________
- GetPlayerName - este functia care verifica numele unui player , mai precis il ia
- ________________________________________________________________________________
- new
- Name[ MAX_PLAYER_NAME ],
- ________________________________________________________________________________
- Str[ 256 ];
- ________________________________________________________________________________
- GetPlayerName( playerid , Name , sizeof Name );
- ________________________________________________________________________________
- format( , sizeof Str, "%s a intrat pe serverul nostru", Name );
- ________________________________________________________________________________
- SendClientMessageToAll( playerid , -1 , Str );
- ________________________________________________________________________________
- Daca nu vrei sa faci mereu cu GetPlayerName foloseste asa :
- ________________________________________________________________________________
- stock GetName( playerid )
- {
- ________________________________________________________________________________
- new
- Name[ MAX_PLAYER_NAME ];
- ________________________________________________________________________________
- GetPlayerName( playerid , Name , sizeof Name );
- ________________________________________________________________________________
- return Name;
- }
- ________________________________________________________________________________
- Stock - iti permite sa folosesti dor o linie / cuvant pentru a lua numele in cazul nostru nu sa mai creezi inca un new cum am facut mai sus si sa te folosesti de functia GetPlayerName .
- ________________________________________________________________________________
- Contact :
- Y!M: alex_toja13@yahoo.com
- Gmail: alex13.dumi@gmail.com
- ________________________________________________________________________________
- #endif
- //=====================================//
- #include <a_samp>
- #include <zcmd>
- //=====================================//
- #define DIALOG_RADIO 2012
- //=====================================//
- new
- string[256],
- pName[MAX_PLAYER_NAME];
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("Radio Filterscript!");
- print("--------------------------------------\n");
- return 1;
- }
- CMD:rmusic(playerid, params[])
- {
- new sradio[1900];
- strcat(sradio, "{FFFFFF}Radio Sensation \t\t\t \n", 1900 );
- strcat(sradio, "{FFFFFF}Radio HiT FM \t\t\t \n", 1900 );
- strcat(sradio, "{FFFFFF}Radio Lautarii \t\t\t \n", 1900 );
- strcat(sradio, "{FFFFFF}Radio Romanian Hip-Hop \t \n", 1900 );
- strcat(sradio, "{FFFFFF}Radio Romanian Manele \t \n", 1900 );
- strcat(sradio, "{FFFFFF}Radio Romanian Popular \t \n", 1900 );
- strcat(sradio, "{FFFFFF}Pro FM \t\t\t\t \n", 1900 );
- strcat(sradio, "{FFFFFF}Radio HotStyle \t\t \n", 1900 );
- strcat(sradio, "{FFFFFF}Radio Vip \t\t \n", 1900 );
- strcat(sradio, "{FFFFFF}Radio Mafia \t\t\t \n", 1900 );
- strcat(sradio, "{FFFFFF}Radio Greu de Difuzat \t\t \n", 1900 );
- strcat(sradio, "{FF0000}Opreste radioul \t\t ", 1900 );
- ShowPlayerDialog(playerid, DIALOG_RADIO, DIALOG_STYLE_LIST, " Meniu Radio", sradio, "Selecteaza", "");
- return 1;
- }
- CMD:radiohit(playerid)
- {
- new
- vehicleid = GetPlayerVehicleID( vehicleid );
- if( !IsPlayerInVehicle( playerid, vehicleid ) )
- return SendClientMessage( playerid , -1 ,"Nu esti in masina pentru a asculta radio" );
- if( IsPlayerInVehicle( playerid, vehicleid ) )
- {
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format( string , sizeof ( string ) , "%s asculta radio ! ", pName );
- SendClientMessageToAll(0xFFFFFFAA,string);
- PlayAudioStreamForPlayer(playerid, "http://www.radio-hit.ro/asculta.m3u");
- }
- return 1;
- }
- CMD:radiowish(playerid)
- {
- new
- vehicleid = GetPlayerVehicleID( vehicleid );
- if( !IsPlayerInVehicle( playerid, vehicleid ) )
- return SendClientMessage( playerid , -1 ,"Nu esti in masina pentru a asculta radio" );
- if( IsPlayerInVehicle( playerid, vehicleid ) )
- {
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format( string , sizeof ( string ) , "%s asculta radio ! ", pName );
- SendClientMessageToAll(0xFFFFFFAA,string);
- PlayAudioStreamForPlayer(playerid, "http://www.radiosensation.ro/live.m3u");
- }
- return 1;
- }
- CMD:contactfm(playerid)
- {
- new
- vehicleid = GetPlayerVehicleID( vehicleid );
- if( !IsPlayerInVehicle( playerid, vehicleid ) )
- return SendClientMessage( playerid , -1 ,"Nu esti in masina pentru a asculta radio" );
- if( IsPlayerInVehicle( playerid, vehicleid ) )
- {
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format( string , sizeof ( string ) , "%s asculta radio ! ", pName );
- SendClientMessageToAll(0xFFFFFFAA,string);
- PlayAudioStreamForPlayer(playerid, "http://live.radiolautaru.ro:9000/");
- }
- return 1;
- }
- CMD:romanianhiphop(playerid)
- {
- new
- vehicleid = GetPlayerVehicleID( vehicleid );
- if( !IsPlayerInVehicle( playerid, vehicleid ) )
- return SendClientMessage( playerid , -1 ,"Nu esti in masina pentru a asculta radio" );
- if( IsPlayerInVehicle( playerid, vehicleid ) )
- {
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format( string , sizeof ( string ) , "%s asculta radio ! ", pName );
- SendClientMessageToAll(0xFFFFFFAA,string);
- PlayAudioStreamForPlayer(playerid, "http://radioromanian.net/hiphop.pls");
- }
- return 1;
- }
- CMD:romanianpopular(playerid)
- {
- new
- vehicleid = GetPlayerVehicleID( vehicleid );
- if( !IsPlayerInVehicle( playerid, vehicleid ) )
- return SendClientMessage( playerid , -1 ,"Nu esti in masina pentru a asculta radio" );
- if( IsPlayerInVehicle( playerid, vehicleid ) )
- {
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format( string , sizeof ( string ) , "%s asculta radio ! ", pName );
- SendClientMessageToAll(0xFFFFFFAA,string);
- PlayAudioStreamForPlayer(playerid, "http://radioromanian.net/popular.pls");
- }
- return 1;
- }
- CMD:romanianmanele(playerid)
- {
- new
- vehicleid = GetPlayerVehicleID( vehicleid );
- if( !IsPlayerInVehicle( playerid, vehicleid ) )
- return SendClientMessage( playerid , -1 ,"Nu esti in masina pentru a asculta radio" );
- if( IsPlayerInVehicle( playerid, vehicleid ) )
- {
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format( string , sizeof ( string ) , "%s asculta radio ! ", pName );
- SendClientMessageToAll(0xFFFFFFAA,string);
- PlayAudioStreamForPlayer(playerid, "http://radioromanian.net/manele.pls");
- }
- return 1;
- }
- CMD:profm(playerid)
- {
- new
- vehicleid = GetPlayerVehicleID( vehicleid );
- if( !IsPlayerInVehicle( playerid, vehicleid ) )
- return SendClientMessage( playerid , -1 ,"Nu esti in masina pentru a asculta radio" );
- if( IsPlayerInVehicle( playerid, vehicleid ) )
- {
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format( string , sizeof ( string ) , "%s asculta radio ! ", pName );
- SendClientMessageToAll(0xFFFFFFAA,string);
- PlayAudioStreamForPlayer(playerid, "http://stream.profm.ro:8012/profm.mp3");
- }
- return 1;
- }
- CMD:gmusic(playerid)
- {
- new
- vehicleid = GetPlayerVehicleID( vehicleid );
- if( !IsPlayerInVehicle( playerid, vehicleid ) )
- return SendClientMessage( playerid , -1 ,"Nu esti in masina pentru a asculta radio" );
- if( IsPlayerInVehicle( playerid, vehicleid ) )
- {
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format( string , sizeof ( string ) , "%s asculta radio ! ", pName );
- SendClientMessageToAll(0xFFFFFFAA,string);
- PlayAudioStreamForPlayer(playerid, "http://www.radiohotstyle.ro/listen.m3u");
- }
- return 1;
- }
- CMD:radiotube(playerid)
- {
- new
- vehicleid = GetPlayerVehicleID( vehicleid );
- if( !IsPlayerInVehicle( playerid, vehicleid ) )
- return SendClientMessage( playerid , -1 ,"Nu esti in masina pentru a asculta radio" );
- if( IsPlayerInVehicle( playerid, vehicleid ) )
- {
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format( string , sizeof ( string ) , "%s asculta radio ! ", pName );
- SendClientMessageToAll(0xFFFFFFAA,string);
- PlayAudioStreamForPlayer(playerid, "http://radiovip.ro/live.m3u");
- }
- return 1;
- }
- CMD:radiomafia(playerid)
- {
- new
- vehicleid = GetPlayerVehicleID( vehicleid );
- if( !IsPlayerInVehicle( playerid, vehicleid ) )
- return SendClientMessage( playerid , -1 ,"Nu esti in masina pentru a asculta radio" );
- if( IsPlayerInVehicle( playerid, vehicleid ) )
- {
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format( string , sizeof ( string ) , "%s asculta radio ! ", pName );
- SendClientMessageToAll(0xFFFFFFAA,string);
- PlayAudioStreamForPlayer(playerid, "http://www.radiomafia.ro/listen.m3u");
- }
- return 1;
- }
- CMD:greudedifuzat(playerid)
- {
- new
- vehicleid = GetPlayerVehicleID( vehicleid );
- if( !IsPlayerInVehicle( playerid, vehicleid ) )
- return SendClientMessage( playerid , -1 ,"Nu esti in masina pentru a asculta radio" );
- if( IsPlayerInVehicle( playerid, vehicleid ) )
- {
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format( string , sizeof ( string ) , "%s asculta radio ! ", pName );
- SendClientMessageToAll(0xFFFFFFAA,string);
- PlayAudioStreamForPlayer(playerid, "http://www.greudedifuzat.eu/greudedifuzat.m3u");
- }
- return 1;
- }
- CMD:stopradio(playerid)
- {
- new
- vehicleid = GetPlayerVehicleID( vehicleid );
- if( !IsPlayerInVehicle( playerid, vehicleid ) )
- return SendClientMessage( playerid , -1 ,"Nu esti in masina pentru a asculta radio" );
- if( IsPlayerInVehicle( playerid, vehicleid ) )
- {
- StopAudioStreamForPlayer(playerid);
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if( dialogid == DIALOG_RADIO )
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: CallRemoteFunction( "OnPlayerCommandText", "is", playerid, "/radiohit" );
- case 1: CallRemoteFunction( "OnPlayerCommandText", "is", playerid, "/contactfm" );
- case 2: CallRemoteFunction( "OnPlayerCommandText", "is", playerid, "/romanianhiphop" );
- case 3: CallRemoteFunction( "OnPlayerCommandText", "is", playerid, "/romanianmanele" );
- case 4: CallRemoteFunction( "OnPlayerCommandText", "is", playerid, "/romanianpopular" );
- case 5: CallRemoteFunction( "OnPlayerCommandText", "is", playerid, "/profm" );
- case 6: CallRemoteFunction( "OnPlayerCommandText", "is", playerid, "/gmusic" );
- case 7: CallRemoteFunction( "OnPlayerCommandText", "is", playerid, "/radiotube" );
- case 8: CallRemoteFunction( "OnPlayerCommandText", "is", playerid, "/radiomafia" );
- case 9: CallRemoteFunction( "OnPlayerCommandText", "is", playerid, "/greudedifuzat" );
- case 10: CallRemoteFunction( "OnPlayerCommandText", "is", playerid, "/stopradio" );
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement