Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //==============================================================================
- #include <a_samp>
- #include <YSI\y_commands>
- #define SIVA 0xAFAFAFAA
- //==============================================================================
- new PlayerText:RadioTD0;
- new PlayerText:RadioTD1;
- new PlayerText:RadioTD2;
- new PlayerText:RadioTD3;
- new PlayerText:RadioTD4;
- new PlayerText:RadioTD5;
- new PlayerText:RadioTD6;
- new PlayerText:RadioTD7;
- //==============================================================================
- new RadioStanica[MAX_PLAYERS];
- new PrikazanRadio[MAX_PLAYERS];
- //==============================================================================
- public OnFilterScriptInit()
- {
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- //==============================================================================
- public OnPlayerConnect(playerid)
- {
- RadioStanica[playerid] = 0; PrikazanRadio[playerid] = 0;
- //====================================================================
- RadioTD0 = CreatePlayerTextDraw(playerid,429.000000, 100.000000, "_");
- PlayerTextDrawBackgroundColor(playerid,RadioTD0, 255);
- PlayerTextDrawFont(playerid,RadioTD0, 1);
- PlayerTextDrawLetterSize(playerid,RadioTD0, 1.000000, 7.800000);
- PlayerTextDrawColor(playerid,RadioTD0, -1);
- PlayerTextDrawSetOutline(playerid,RadioTD0, 0);
- PlayerTextDrawSetProportional(playerid,RadioTD0, 1);
- PlayerTextDrawSetShadow(playerid,RadioTD0, 1);
- PlayerTextDrawUseBox(playerid,RadioTD0, 1);
- PlayerTextDrawBoxColor(playerid,RadioTD0, 4227272);
- PlayerTextDrawTextSize(playerid,RadioTD0, 199.000000, 0.000000);
- RadioTD1 = CreatePlayerTextDraw(playerid,425.000000, 103.000000, "__");
- PlayerTextDrawBackgroundColor(playerid,RadioTD1, 255);
- PlayerTextDrawFont(playerid,RadioTD1, 1);
- PlayerTextDrawLetterSize(playerid,RadioTD1, 0.500000, 7.099997);
- PlayerTextDrawColor(playerid,RadioTD1, -1);
- PlayerTextDrawSetOutline(playerid,RadioTD1, 0);
- PlayerTextDrawSetProportional(playerid,RadioTD1, 1);
- PlayerTextDrawSetShadow(playerid,RadioTD1, 1);
- PlayerTextDrawUseBox(playerid,RadioTD1, 1);
- PlayerTextDrawBoxColor(playerid,RadioTD1, 255);
- PlayerTextDrawTextSize(playerid,RadioTD1, 203.000000, 0.000000);
- RadioTD2 = CreatePlayerTextDraw(playerid,401.000000, 110.000000, "____");
- PlayerTextDrawBackgroundColor(playerid,RadioTD2, 0);
- PlayerTextDrawFont(playerid,RadioTD2, 1);
- PlayerTextDrawLetterSize(playerid,RadioTD2, 0.500000, 1.000000);
- PlayerTextDrawColor(playerid,RadioTD2, -1);
- PlayerTextDrawSetOutline(playerid,RadioTD2, 0);
- PlayerTextDrawSetProportional(playerid,RadioTD2, 1);
- PlayerTextDrawSetShadow(playerid,RadioTD2, 1);
- PlayerTextDrawUseBox(playerid,RadioTD2, 1);
- PlayerTextDrawBoxColor(playerid,RadioTD2, 4227272);
- PlayerTextDrawTextSize(playerid,RadioTD2, 230.000000, 0.000000);
- RadioTD3 = CreatePlayerTextDraw(playerid,314.000000, 109.000000, "Cool Radio");
- PlayerTextDrawAlignment(playerid,RadioTD3, 2);
- PlayerTextDrawBackgroundColor(playerid,RadioTD3, 255);
- PlayerTextDrawFont(playerid,RadioTD3, 2);
- PlayerTextDrawLetterSize(playerid,RadioTD3, 0.319999, 1.000000);
- PlayerTextDrawColor(playerid,RadioTD3, -1);
- PlayerTextDrawSetOutline(playerid,RadioTD3, 1);
- PlayerTextDrawSetProportional(playerid,RadioTD3, 1);
- RadioTD4 = CreatePlayerTextDraw(playerid,254.000000, 86.000000, "RadioModel");
- PlayerTextDrawBackgroundColor(playerid,RadioTD4, 0);
- PlayerTextDrawFont(playerid,RadioTD4, 5);
- PlayerTextDrawLetterSize(playerid,RadioTD4, 0.500000, 1.000000);
- PlayerTextDrawColor(playerid,RadioTD4, -1);
- PlayerTextDrawSetOutline(playerid,RadioTD4, 0);
- PlayerTextDrawSetProportional(playerid,RadioTD4, 1);
- PlayerTextDrawSetShadow(playerid,RadioTD4, 1);
- PlayerTextDrawUseBox(playerid,RadioTD4, 1);
- PlayerTextDrawBoxColor(playerid,RadioTD4, 255);
- PlayerTextDrawTextSize(playerid,RadioTD4, 104.000000, 112.000000);
- PlayerTextDrawSetPreviewModel(playerid, RadioTD4, 19612);
- PlayerTextDrawSetPreviewRot(playerid, RadioTD4, 0.000000, 0.000000, -20.000000, 1.000000);
- RadioTD5 = CreatePlayerTextDraw(playerid,219.000000, 115.000000, "Nazad");
- PlayerTextDrawBackgroundColor(playerid,RadioTD5, 0);
- PlayerTextDrawFont(playerid,RadioTD5, 5);
- PlayerTextDrawLetterSize(playerid,RadioTD5, 0.500000, 1.000000);
- PlayerTextDrawColor(playerid,RadioTD5, -1);
- PlayerTextDrawSetOutline(playerid,RadioTD5, 0);
- PlayerTextDrawSetProportional(playerid,RadioTD5, 1);
- PlayerTextDrawSetShadow(playerid,RadioTD5, 1);
- PlayerTextDrawUseBox(playerid,RadioTD5, 1);
- PlayerTextDrawBoxColor(playerid,RadioTD5, 255);
- PlayerTextDrawTextSize(playerid,RadioTD5, 47.000000, 66.000000);
- PlayerTextDrawSetPreviewModel(playerid, RadioTD5, 19130);
- PlayerTextDrawSetPreviewRot(playerid, RadioTD5, 0.000000, -90.000000, 100.000000, 1.000000);
- PlayerTextDrawSetSelectable(playerid,RadioTD5, 1);
- RadioTD6 = CreatePlayerTextDraw(playerid,365.000000, 115.000000, "Napred");
- PlayerTextDrawBackgroundColor(playerid,RadioTD6, 0);
- PlayerTextDrawFont(playerid,RadioTD6, 5);
- PlayerTextDrawLetterSize(playerid,RadioTD6, 0.500000, 1.000000);
- PlayerTextDrawColor(playerid,RadioTD6, -1);
- PlayerTextDrawSetOutline(playerid,RadioTD6, 0);
- PlayerTextDrawSetProportional(playerid,RadioTD6, 1);
- PlayerTextDrawSetShadow(playerid,RadioTD6, 1);
- PlayerTextDrawUseBox(playerid,RadioTD6, 1);
- PlayerTextDrawBoxColor(playerid,RadioTD6, 255);
- PlayerTextDrawTextSize(playerid,RadioTD6, 47.000000, 66.000000);
- PlayerTextDrawSetPreviewModel(playerid, RadioTD6, 19130);
- PlayerTextDrawSetPreviewRot(playerid, RadioTD6, 0.000000, 90.000000, 100.000000, 1.000000);
- PlayerTextDrawSetSelectable(playerid,RadioTD6, 1);
- RadioTD7 = CreatePlayerTextDraw(playerid,267.000000, 155.000000, "/turnoff /stopmusic");
- PlayerTextDrawBackgroundColor(playerid,RadioTD7, 255);
- PlayerTextDrawFont(playerid,RadioTD7, 2);
- PlayerTextDrawLetterSize(playerid,RadioTD7, 0.200000, 1.000000);
- PlayerTextDrawColor(playerid,RadioTD7, -1);
- PlayerTextDrawSetOutline(playerid,RadioTD7, 1);
- PlayerTextDrawSetProportional(playerid,RadioTD7, 1);
- return 1;
- }
- //==============================================================================
- public OnPlayerDisconnect(playerid, reason)
- {
- RadioStanica[playerid] = 0; PrikazanRadio[playerid] = 0;
- return 1;
- }
- //==============================================================================
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- return 1;
- }
- //==============================================================================
- public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
- {
- if(playertextid == RadioTD6)
- {
- if(RadioStanica[playerid] == 1)
- {
- RadioStanica[playerid] = 2;
- PlayAudioStreamForPlayer(playerid, "http://89.205.127.244:8002");
- PlayerTextDrawSetString(playerid, RadioTD3,"Folk Radio");
- }
- else if(RadioStanica[playerid] == 2)
- {
- RadioStanica[playerid] = 3;
- PlayAudioStreamForPlayer(playerid, "http://pink.exyuserver.com/listen.pls");
- PlayerTextDrawSetString(playerid, RadioTD3,"Pink Radio");
- }
- else if(RadioStanica[playerid] == 3)
- {
- RadioStanica[playerid] = 4;
- PlayAudioStreamForPlayer(playerid, "http://balkan.dj.topstream.net:8070");
- PlayerTextDrawSetString(playerid, RadioTD3,"Balkan DJ Radio");
- }
- else if(RadioStanica[playerid] == 4)
- {
- RadioStanica[playerid] = 5;
- PlayAudioStreamForPlayer(playerid, "http://rtvmerak.com:8003");
- PlayerTextDrawSetString(playerid, RadioTD3,"Juzni Vetar Radio");
- }
- else if(RadioStanica[playerid] == 5)
- {
- RadioStanica[playerid] = 1;
- PlayAudioStreamForPlayer(playerid,"http://www.coolradio.rs/download/playlist.pls");
- PlayerTextDrawSetString(playerid, RadioTD3,"Cool Radio");
- }
- }
- if(playertextid == RadioTD5)
- {
- if(RadioStanica[playerid] == 1)
- {
- RadioStanica[playerid] = 5;
- PlayAudioStreamForPlayer(playerid, "http://rtvmerak.com:8003");
- PlayerTextDrawSetString(playerid, RadioTD3,"Juzni Vetar Radio");
- }
- else if(RadioStanica[playerid] == 2)
- {
- RadioStanica[playerid] = 1;
- PlayAudioStreamForPlayer(playerid, "http://www.coolradio.rs/download/playlist.pls");
- PlayerTextDrawSetString(playerid, RadioTD3,"Cool Radio");
- }
- else if(RadioStanica[playerid] == 3)
- {
- RadioStanica[playerid] = 2;
- PlayAudioStreamForPlayer(playerid, "http://89.205.127.244:8002");
- PlayerTextDrawSetString(playerid, RadioTD3,"Folk Radio");
- }
- else if(RadioStanica[playerid] == 4)
- {
- RadioStanica[playerid] = 3;
- PlayAudioStreamForPlayer(playerid, "http://pink.exyuserver.com/listen.pls");
- PlayerTextDrawSetString(playerid, RadioTD3,"Pink Radio");
- }
- else if(RadioStanica[playerid] == 5)
- {
- RadioStanica[playerid] = 4;
- PlayAudioStreamForPlayer(playerid,"http://balkan.dj.topstream.net:8070");
- PlayerTextDrawSetString(playerid, RadioTD3,"Balkan DJ Radio");
- }
- }
- return 1;
- }
- //==============================================================================
- //=================== KOMANDE ==========================
- YCMD:radio(playerid,params[],help)
- {
- if(PrikazanRadio[playerid] == 1) return SendClientMessage(playerid,-1,"Vec vam je prikazan radio!");
- PlayerTextDrawShow(playerid, RadioTD0); PlayerTextDrawShow(playerid, RadioTD1); PlayerTextDrawShow(playerid, RadioTD2); PlayerTextDrawShow(playerid, RadioTD3);
- PlayerTextDrawShow(playerid, RadioTD4); PlayerTextDrawShow(playerid, RadioTD5); PlayerTextDrawShow(playerid, RadioTD6); PlayerTextDrawShow(playerid, RadioTD7);
- RadioStanica[playerid] = 1;
- PrikazanRadio[playerid] = 1;
- PlayAudioStreamForPlayer(playerid, "http://www.coolradio.rs/download/playlist.pls");
- SelectTextDraw(playerid,-1);
- return 1;
- }
- //==============================================================================
- YCMD:turnoff(playerid,params[],help)
- {
- if(PrikazanRadio[playerid] == 0) return SendClientMessage(playerid,-1,"Nije vam prikazan radio!");
- PlayerTextDrawHide(playerid, RadioTD0); PlayerTextDrawHide(playerid, RadioTD1); PlayerTextDrawHide(playerid, RadioTD2); PlayerTextDrawHide(playerid, RadioTD3);
- PlayerTextDrawHide(playerid, RadioTD4); PlayerTextDrawHide(playerid, RadioTD5); PlayerTextDrawHide(playerid, RadioTD6); PlayerTextDrawHide(playerid, RadioTD7);
- CancelSelectTextDraw(playerid); PrikazanRadio[playerid] = 0;
- return 1;
- }
- //==============================================================================
- YCMD:stopmusic(playerid, params[],help)
- {
- #pragma unused help
- StopAudioStreamForPlayer(playerid);
- return 1;
- }
- //==================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement