Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*=============================================================
- =============================================================
- Music System by HitterHitman a.k.a Kick_Ass.
- Credits:
- HitterHitman a.k.a Kick_Ass(me) for the script.
- Diclaimer:
- Don't remove or add any credits.
- Don't release it without my permission.
- Don't post any edited versions.
- =============================================================
- =============================================================*/
- //includes
- #include <a_samp>//by SA-MP Team
- #include <zcmd>//by Zeex
- //=============================================================
- //=============================================================
- //Defines//
- #define Song1 "~r~T~w~umbourine"
- #define Song1URL "http://k007.kiwi6.com/download/qwfrxp3ko6"
- #define Song1Info "Album: ~r~None~n~~w~Author: ~r~Eve~n~~w~Length: ~r~3:12~n~"
- //=============================================================
- #define Song2 "~r~B~w~lack & ~r~Y~w~ellow"
- #define Song2URL "http://allinonegame.weebly.com/uploads/1/3/2/9/13299580/black_and_yellow.mp3"
- #define Song2Info "Album: ~r~Unknown~n~~w~Author: ~r~Unknown~n~~w~Length: ~r~Unknown~n~"
- //=============================================================
- #define Song3 "~r~D~w~o ~r~f~w~or ~r~l~w~ove"
- #define Song3URL "http://www.directlinkupload.com/uploads/117.200.242.54/P%20Holla%20-%20Do%20it%20for%20love.mp3"
- #define Song3Info "Album: ~r~None~n~~w~Author: ~r~P holla~n~~w~Length: ~r~3:04~n~"
- //=============================================================
- #define Song4 "Song 4"
- #define Song4URL " "
- #define Song4Info "Album: ~n~Author: ~n~Length: ~n~"
- //=============================================================
- #define Song5 "Song 5"
- #define Song5URL " "
- #define Song5Info "Album: ~n~Author: ~n~Length: ~n~"
- //=============================================================
- //=============================================================
- //Variables//
- new Text:MusicText[17];
- new PlayerText:Discription[MAX_PLAYERS];
- //=============================================================
- //=============================================================
- public OnFilterScriptInit()
- {
- print("\n-----------------------------------------------");
- print(" Music System by HitterHitman a.k.a. Kick_Ass");
- print("------------------->Loaded<-------------------");
- print("----------------------------------------------\n");
- MusicText[0] = TextDrawCreate(478.000000, 121.000000, "~n~");
- TextDrawBackgroundColor(MusicText[0], 255);
- TextDrawFont(MusicText[0], 1);
- TextDrawLetterSize(MusicText[0], 0.500000, 1.000000);
- TextDrawColor(MusicText[0], -1);
- TextDrawSetOutline(MusicText[0], 0);
- TextDrawSetProportional(MusicText[0], 1);
- TextDrawSetShadow(MusicText[0], 1);
- TextDrawUseBox(MusicText[0], 1);
- TextDrawBoxColor(MusicText[0], 255);
- TextDrawTextSize(MusicText[0], 143.000000, 0.000000);
- TextDrawSetSelectable(MusicText[0], 0);
- MusicText[1] = TextDrawCreate(478.000000, 342.000000, "~n~");
- TextDrawBackgroundColor(MusicText[1], 255);
- TextDrawFont(MusicText[1], 1);
- TextDrawLetterSize(MusicText[1], 0.500000, 1.000000);
- TextDrawColor(MusicText[1], -1);
- TextDrawSetOutline(MusicText[1], 0);
- TextDrawSetProportional(MusicText[1], 1);
- TextDrawSetShadow(MusicText[1], 1);
- TextDrawUseBox(MusicText[1], 1);
- TextDrawBoxColor(MusicText[1], 255);
- TextDrawTextSize(MusicText[1], 143.000000, 0.000000);
- TextDrawSetSelectable(MusicText[1], 0);
- MusicText[2] = TextDrawCreate(478.000000, 138.000000, "~n~");
- TextDrawBackgroundColor(MusicText[2], 255);
- TextDrawFont(MusicText[2], 1);
- TextDrawLetterSize(MusicText[2], 0.500000, 9.599998);
- TextDrawColor(MusicText[2], -1);
- TextDrawSetOutline(MusicText[2], 0);
- TextDrawSetProportional(MusicText[2], 1);
- TextDrawSetShadow(MusicText[2], 1);
- TextDrawUseBox(MusicText[2], 1);
- TextDrawBoxColor(MusicText[2], 100);
- TextDrawTextSize(MusicText[2], 143.000000, 0.000000);
- TextDrawSetSelectable(MusicText[2], 0);
- MusicText[3] = TextDrawCreate(149.000000, 232.000000, " Description");
- TextDrawBackgroundColor(MusicText[3], 255);
- TextDrawFont(MusicText[3], 3);
- TextDrawLetterSize(MusicText[3], 0.500000, 1.000000);
- TextDrawColor(MusicText[3], -1);
- TextDrawSetOutline(MusicText[3], 1);
- TextDrawSetProportional(MusicText[3], 1);
- TextDrawUseBox(MusicText[3], 1);
- TextDrawBoxColor(MusicText[3], 255);
- TextDrawTextSize(MusicText[3], 472.000000, 0.000000);
- TextDrawSetSelectable(MusicText[3], 0);
- MusicText[4] = TextDrawCreate(477.000000, 138.000000, "~n~");
- TextDrawBackgroundColor(MusicText[4], 255);
- TextDrawFont(MusicText[4], 1);
- TextDrawLetterSize(MusicText[4], 0.500000, 9.599993);
- TextDrawColor(MusicText[4], -1);
- TextDrawSetOutline(MusicText[4], 0);
- TextDrawSetProportional(MusicText[4], 1);
- TextDrawSetShadow(MusicText[4], 1);
- TextDrawUseBox(MusicText[4], 1);
- TextDrawBoxColor(MusicText[4], 255);
- TextDrawTextSize(MusicText[4], 362.000000, 0.000000);
- TextDrawSetSelectable(MusicText[4], 0);
- MusicText[5] = TextDrawCreate(478.000000, 248.000000, "~n~");
- TextDrawBackgroundColor(MusicText[5], 255);
- TextDrawFont(MusicText[5], 1);
- TextDrawLetterSize(MusicText[5], 0.500000, 9.599998);
- TextDrawColor(MusicText[5], -1);
- TextDrawSetOutline(MusicText[5], 0);
- TextDrawSetProportional(MusicText[5], 1);
- TextDrawSetShadow(MusicText[5], 1);
- TextDrawUseBox(MusicText[5], 1);
- TextDrawBoxColor(MusicText[5], 100);
- TextDrawTextSize(MusicText[5], 143.000000, 0.000000);
- TextDrawSetSelectable(MusicText[5], 0);
- MusicText[6] = TextDrawCreate(156.000000, 141.000000, "Songs");
- TextDrawBackgroundColor(MusicText[6], 255);
- TextDrawFont(MusicText[6], 3);
- TextDrawLetterSize(MusicText[6], 0.509999, 1.200000);
- TextDrawColor(MusicText[6], -1);
- TextDrawSetOutline(MusicText[6], 1);
- TextDrawSetProportional(MusicText[6], 1);
- TextDrawSetSelectable(MusicText[6], 0);
- MusicText[7] = TextDrawCreate(156.000000, 159.000000, Song1);
- TextDrawBackgroundColor(MusicText[7], 255);
- TextDrawFont(MusicText[7], 2);
- TextDrawLetterSize(MusicText[7], 0.400000, 1.300000);
- TextDrawColor(MusicText[7], -1);
- TextDrawSetOutline(MusicText[7], 0);
- TextDrawSetProportional(MusicText[7], 1);
- TextDrawSetShadow(MusicText[7], 1);
- TextDrawUseBox(MusicText[7], 1);
- TextDrawBoxColor(MusicText[7], 0);
- TextDrawTextSize(MusicText[7], 357.000000, 10.000000);
- TextDrawSetSelectable(MusicText[7], 1);
- MusicText[8] = TextDrawCreate(156.000000, 172.000000, Song2);
- TextDrawBackgroundColor(MusicText[8], 255);
- TextDrawFont(MusicText[8], 2);
- TextDrawLetterSize(MusicText[8], 0.400000, 1.300000);
- TextDrawColor(MusicText[8], -1);
- TextDrawSetOutline(MusicText[8], 0);
- TextDrawSetProportional(MusicText[8], 1);
- TextDrawSetShadow(MusicText[8], 1);
- TextDrawUseBox(MusicText[8], 1);
- TextDrawBoxColor(MusicText[8], 0);
- TextDrawTextSize(MusicText[8], 357.000000, 10.000000);
- TextDrawSetSelectable(MusicText[8], 1);
- MusicText[9] = TextDrawCreate(156.000000, 185.000000, Song3);
- TextDrawBackgroundColor(MusicText[9], 255);
- TextDrawFont(MusicText[9], 2);
- TextDrawLetterSize(MusicText[9], 0.400000, 1.300000);
- TextDrawColor(MusicText[9], -1);
- TextDrawSetOutline(MusicText[9], 0);
- TextDrawSetProportional(MusicText[9], 1);
- TextDrawSetShadow(MusicText[9], 1);
- TextDrawUseBox(MusicText[9], 1);
- TextDrawBoxColor(MusicText[9], 0);
- TextDrawTextSize(MusicText[9], 357.000000, 10.000000);
- TextDrawSetSelectable(MusicText[9], 1);
- MusicText[10] = TextDrawCreate(156.000000, 198.000000, Song4);
- TextDrawBackgroundColor(MusicText[10], 255);
- TextDrawFont(MusicText[10], 2);
- TextDrawLetterSize(MusicText[10], 0.400000, 1.300000);
- TextDrawColor(MusicText[10], -1);
- TextDrawSetOutline(MusicText[10], 0);
- TextDrawSetProportional(MusicText[10], 1);
- TextDrawSetShadow(MusicText[10], 1);
- TextDrawUseBox(MusicText[10], 1);
- TextDrawBoxColor(MusicText[10], 0);
- TextDrawTextSize(MusicText[10], 357.000000, 10.000000);
- TextDrawSetSelectable(MusicText[10], 1);
- MusicText[11] = TextDrawCreate(156.000000, 210.000000, Song5);
- TextDrawBackgroundColor(MusicText[11], 255);
- TextDrawFont(MusicText[11], 2);
- TextDrawLetterSize(MusicText[11], 0.400000, 1.300000);
- TextDrawColor(MusicText[11], -1);
- TextDrawSetOutline(MusicText[11], 0);
- TextDrawSetProportional(MusicText[11], 1);
- TextDrawSetShadow(MusicText[11], 1);
- TextDrawUseBox(MusicText[11], 1);
- TextDrawBoxColor(MusicText[11], 0);
- TextDrawTextSize(MusicText[11], 357.000000, 10.000000);
- TextDrawSetSelectable(MusicText[11], 1);
- MusicText[12] = TextDrawCreate(156.000000, 322.000000, "Stop Playing");
- TextDrawBackgroundColor(MusicText[12], 255);
- TextDrawFont(MusicText[12], 3);
- TextDrawLetterSize(MusicText[12], 0.500000, 1.200000);
- TextDrawColor(MusicText[12], -16776961);
- TextDrawSetOutline(MusicText[12], 1);
- TextDrawSetProportional(MusicText[12], 1);
- TextDrawUseBox(MusicText[12], 1);
- TextDrawBoxColor(MusicText[12], 0);
- TextDrawTextSize(MusicText[12], 268.000000, 10.000000);
- TextDrawSetSelectable(MusicText[12], 1);
- MusicText[13] = TextDrawCreate(456.000000, 117.000000, "ld_chat:thumbdn");
- TextDrawBackgroundColor(MusicText[13], 255);
- TextDrawFont(MusicText[13], 4);
- TextDrawLetterSize(MusicText[13], 0.500000, 1.000000);
- TextDrawColor(MusicText[13], -1);
- TextDrawSetOutline(MusicText[13], 0);
- TextDrawSetProportional(MusicText[13], 1);
- TextDrawSetShadow(MusicText[13], 1);
- TextDrawUseBox(MusicText[13], 1);
- TextDrawBoxColor(MusicText[13], 255);
- TextDrawTextSize(MusicText[13], 18.000000, 19.000000);
- TextDrawSetSelectable(MusicText[13], 1);
- MusicText[14] = TextDrawCreate(371.000000, 141.000000, "loadsc2:loadsc2");
- TextDrawBackgroundColor(MusicText[14], 255);
- TextDrawFont(MusicText[14], 4);
- TextDrawLetterSize(MusicText[14], 0.500000, 1.000000);
- TextDrawColor(MusicText[14], -1);
- TextDrawSetOutline(MusicText[14], 0);
- TextDrawSetProportional(MusicText[14], 1);
- TextDrawSetShadow(MusicText[14], 1);
- TextDrawUseBox(MusicText[14], 1);
- TextDrawBoxColor(MusicText[14], 255);
- TextDrawTextSize(MusicText[14], 98.000000, 82.000000);
- MusicText[15] = TextDrawCreate(374.000000, 197.000000, "~w~By ~n~~r~K~w~ick_~r~A~w~ss");//don't remove this textdraw
- TextDrawBackgroundColor(MusicText[15], 255);
- TextDrawFont(MusicText[15], 3);
- TextDrawLetterSize(MusicText[15], 0.490000, 1.200000);
- TextDrawColor(MusicText[15], -1);
- TextDrawSetOutline(MusicText[15], 1);
- TextDrawSetProportional(MusicText[15], 1);
- MusicText[16] = TextDrawCreate(10.000000, 118.000000, "New Textdraw");
- TextDrawBackgroundColor(MusicText[16], 0);
- TextDrawFont(MusicText[16], 5);
- TextDrawLetterSize(MusicText[16], 0.500000, 1.000000);
- TextDrawColor(MusicText[16], -1);
- TextDrawSetOutline(MusicText[16], 0);
- TextDrawSetProportional(MusicText[16], 1);
- TextDrawSetShadow(MusicText[16], 1);
- TextDrawUseBox(MusicText[16], 1);
- TextDrawBoxColor(MusicText[16], 255);
- TextDrawTextSize(MusicText[16], 230.000000, 247.000000);
- TextDrawSetPreviewModel(MusicText[16], 3);
- TextDrawSetPreviewRot(MusicText[16], -16.000000, 0.000000, 20.000000, 1.000000);
- TextDrawSetSelectable(MusicText[16], 0);
- return 1;
- }
- //=============================================================
- //=============================================================
- public OnFilterScriptExit()
- {
- for(new i = 0; i < 17; i++)
- {
- TextDrawHideForAll(MusicText[i]);
- TextDrawDestroy(MusicText[i]);
- }
- return 1;
- }
- //=============================================================
- //=============================================================
- public OnPlayerConnect(playerid)
- {
- Discription[playerid] = CreatePlayerTextDraw(playerid, 156.000000, 256.000000, "No description available.");
- PlayerTextDrawBackgroundColor(playerid, Discription[playerid], 255);
- PlayerTextDrawFont(playerid, Discription[playerid], 2);
- PlayerTextDrawLetterSize(playerid, Discription[playerid], 0.400000, 1.300000);
- PlayerTextDrawColor(playerid, Discription[playerid], -1);
- PlayerTextDrawSetOutline(playerid, Discription[playerid], 0);
- PlayerTextDrawSetProportional(playerid, Discription[playerid], 1);
- PlayerTextDrawSetShadow(playerid, Discription[playerid], 1);
- return 1;
- }
- //=============================================================
- //=============================================================
- public OnPlayerDisconnect(playerid, reason)
- {
- PlayerTextDrawHide(playerid, Discription[playerid]);
- PlayerTextDrawDestroy(playerid, Discription[playerid]);
- return 1;
- }
- //=============================================================
- //=============================================================
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- //=============================================================
- //=============================================================
- CMD:music(playerid, params[])
- {
- for(new i = 0; i < 17; i++)
- {
- TextDrawShowForPlayer(playerid, MusicText[i]);
- }
- PlayerTextDrawShow(playerid, Discription[playerid]);
- PlayerTextDrawSetString(playerid, Discription[playerid], "No description available.");
- SelectTextDraw(playerid, 0x00FF00FF); // Highlight green when hovering over
- return 1;
- }
- //=============================================================
- //=============================================================
- public OnPlayerClickTextDraw(playerid, Text:clickedid)
- {
- if(clickedid == MusicText[7])//song 1
- {
- PlayAudioStreamForPlayer(playerid, Song1URL);
- PlayerTextDrawSetString(playerid, Discription[playerid], Song1Info);
- return 1;
- }
- else if(clickedid == MusicText[8])//song 2
- {
- PlayAudioStreamForPlayer(playerid, Song2URL);
- PlayerTextDrawSetString(playerid, Discription[playerid], Song2Info);
- return 1;
- }
- else if(clickedid == MusicText[9])//song 3
- {
- PlayAudioStreamForPlayer(playerid, Song3URL);
- PlayerTextDrawSetString(playerid, Discription[playerid], Song3Info);
- return 1;
- }
- else if(clickedid == MusicText[10])//song 4
- {
- PlayAudioStreamForPlayer(playerid, Song4URL);
- PlayerTextDrawSetString(playerid, Discription[playerid], Song4Info);
- return 1;
- }
- else if(clickedid == MusicText[11])//song 5
- {
- PlayAudioStreamForPlayer(playerid, Song5URL);
- PlayerTextDrawSetString(playerid, Discription[playerid], Song5Info);
- return 1;
- }
- else if(clickedid == MusicText[12])//"Stop Playing" Button
- {
- StopAudioStreamForPlayer(playerid);
- SendClientMessage(playerid, -1, "Playback Stopped.");
- return 1;
- }
- else if(clickedid == MusicText[13])//"x"(close) button
- {
- for(new i = 0; i < 17; i++)
- {
- TextDrawHideForPlayer(playerid, MusicText[i]);
- }
- PlayerTextDrawHide(playerid, Discription[playerid]);
- CancelSelectTextDraw(playerid);
- return 1;
- }
- return 1;
- }
- //=============================================================
- //=============================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement