Advertisement
Guest User

Sistema SAMP DJ 0.3.7 [ Inglês ]

a guest
Jul 29th, 2015
1,042
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 11.09 KB | None | 0 0
  1. /*
  2. * IP do Servidor: 192.95.6.22:7710 - BRASIL NOVO MUNDO 0.3.7 Creditos: Jimmy
  3. */
  4.  
  5. #define FILTERSCRIPT
  6. #include <a_samp>
  7. #include <a_http>
  8. #include "ZCMD"
  9.  
  10. #if defined FILTERSCRIPT
  11.  
  12. #define DIALOG_SAMP_DJ                406
  13. new PlayerText:_SAMP_DJ[14];
  14. new MusicaN[MAX_PLAYERS];
  15.  
  16. forward PlayAudioStreamByName(playerid, name[]);
  17. forward PlayAudioStreamByNameEx(index, response_code, data[]);
  18.  
  19. public OnFilterScriptInit()
  20. {
  21.     print("\n--------------------------------------");
  22.     print(" Sistema SAMP DJ - By Jimmy");
  23.     print("--------------------------------------\n");
  24.     return 1;
  25. }
  26.  
  27. public OnFilterScriptExit()
  28. {
  29.     return 1;
  30. }
  31.  
  32. CMD:abrirpaineldj(playerid, params[])
  33. {
  34.     SelectTextDraw(playerid , 0xFFFFFFFF);
  35.     for(new T = 0; T < sizeof(_SAMP_DJ); ++T) PlayerTextDrawShow(playerid, _SAMP_DJ[T]);
  36.     return 1;
  37. }
  38.  
  39. CMD:fecharpaineldj(playerid, params[])
  40. {
  41.     for(new T = 0; T < sizeof(_SAMP_DJ); ++T) PlayerTextDrawHide(playerid, _SAMP_DJ[T]);
  42.     CancelSelectTextDraw(playerid);
  43.     return 1;
  44. }
  45.  
  46. public OnPlayerConnect(playerid)
  47. {
  48.     CarregarText(playerid);
  49.     return 1;
  50. }
  51.  
  52. public OnPlayerDisconnect(playerid, reason)
  53. {
  54.     return 1;
  55. }
  56.  
  57. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  58. {
  59.     if(dialogid == DIALOG_SAMP_DJ)
  60.     {
  61.         if(!response || strlen(inputtext) < 1 || strlen(inputtext) > 25) return ShowPlayerDialog(playerid, DIALOG_SAMP_DJ, DIALOG_STYLE_INPUT, "{F6A100}Music", "\n{FFFFFF}What Music ?:\n", "Ok", "Close");
  62.  
  63.         format(MusicaN[playerid], 60, "%s", inputtext);
  64.         PlayerTextDrawSetString(playerid, _SAMP_DJ[11], inputtext);
  65.     }
  66.     return 1;
  67. }
  68.  
  69. public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
  70. {
  71.     if(playertextid == _SAMP_DJ[11])
  72.     {
  73.         ShowPlayerDialog(playerid, DIALOG_SAMP_DJ, DIALOG_STYLE_INPUT, "{F6A100}Music", "\n{FFFFFF}What Music ?\n", "Ok", "Close");
  74.     }
  75.     if(playertextid == _SAMP_DJ[12])
  76.     {
  77.         if(MusicaN[playerid] == 0) return ShowPlayerDialog(playerid, DIALOG_SAMP_DJ, DIALOG_STYLE_INPUT, "{F6A100}Music", "\n{FFFFFF}What Music ?\n", "Ok", "Close");
  78.         PlayAudioStreamByName(playerid, MusicaN[playerid]);
  79.         SendClientMessage(playerid, -1, "Please wait !..");
  80.     }
  81.     if(playertextid == _SAMP_DJ[13])
  82.     {
  83.         for(new i = 0; i < MAX_PLAYERS; i++)
  84.         {
  85.             StopAudioStreamForPlayer(i);
  86.             MusicaN[i] = 0;
  87.             PlayerTextDrawSetString(playerid, _SAMP_DJ[11], "Choose your Music");
  88.         }
  89.  
  90.     }
  91.     return 1;
  92. }
  93.  
  94. public PlayAudioStreamByName(playerid, name[])
  95. {
  96.     for(new i; i < strlen(name); i++) {
  97.         if(name[i] == ' ') name[i] = '+';
  98.     }
  99.     new str[160];
  100.     format(str, 160, "topbrasilnovomundo.16mb.com/SAMP.php?q=%s", name);
  101.     HTTP(playerid, HTTP_GET, str, "", "PlayAudioStreamByNameEx");
  102.     return 1;
  103. }
  104.  
  105. public PlayAudioStreamByNameEx(index, response_code, data[])
  106. {
  107.     if(response_code == 200)
  108.     {
  109.         for(new i = 0; i < MAX_PLAYERS; i++){PlayAudioStreamForPlayer(i, data);}
  110.     }
  111.     return 1;
  112. }
  113.  
  114. CarregarText(playerid)
  115. {
  116.     _SAMP_DJ[0] = CreatePlayerTextDraw(playerid, 509.222137, 107.796279, "usebox");
  117.     PlayerTextDrawLetterSize(playerid, _SAMP_DJ[0], 0.000000, 27.510494);
  118.     PlayerTextDrawTextSize(playerid, _SAMP_DJ[0], 116.888877, 0.000000);
  119.     PlayerTextDrawAlignment(playerid, _SAMP_DJ[0], 1);
  120.     PlayerTextDrawColor(playerid, _SAMP_DJ[0], 0);
  121.     PlayerTextDrawUseBox(playerid, _SAMP_DJ[0], true);
  122.     PlayerTextDrawBoxColor(playerid, _SAMP_DJ[0], 471604479);
  123.     PlayerTextDrawSetShadow(playerid, _SAMP_DJ[0], 0);
  124.     PlayerTextDrawSetOutline(playerid, _SAMP_DJ[0], 0);
  125.     PlayerTextDrawFont(playerid, _SAMP_DJ[0], 0);
  126.  
  127.     _SAMP_DJ[1] = CreatePlayerTextDraw(playerid, 144.999969, 212.074111, "ld_pool:ball");
  128.     PlayerTextDrawLetterSize(playerid, _SAMP_DJ[1], 0.000000, 0.000000);
  129.     PlayerTextDrawTextSize(playerid, _SAMP_DJ[1], 135.000061, 126.518554);
  130.     PlayerTextDrawAlignment(playerid, _SAMP_DJ[1], 1);
  131.     PlayerTextDrawColor(playerid, _SAMP_DJ[1], 471604479);
  132.     PlayerTextDrawSetShadow(playerid, _SAMP_DJ[1], 0);
  133.     PlayerTextDrawSetOutline(playerid, _SAMP_DJ[1], 0);
  134.     PlayerTextDrawBackgroundColor(playerid, _SAMP_DJ[1], 65535);
  135.     PlayerTextDrawFont(playerid, _SAMP_DJ[1], 4);
  136.  
  137.     _SAMP_DJ[2] = CreatePlayerTextDraw(playerid, 347.222259, 208.444442, "ld_pool:ball");
  138.     PlayerTextDrawLetterSize(playerid, _SAMP_DJ[2], 0.018333, 0.295555);
  139.     PlayerTextDrawTextSize(playerid, _SAMP_DJ[2], 133.888900, 123.925918);
  140.     PlayerTextDrawAlignment(playerid, _SAMP_DJ[2], 1);
  141.     PlayerTextDrawColor(playerid, _SAMP_DJ[2], 471604479);
  142.     PlayerTextDrawSetShadow(playerid, _SAMP_DJ[2], 0);
  143.     PlayerTextDrawSetOutline(playerid, _SAMP_DJ[2], 0);
  144.     PlayerTextDrawFont(playerid, _SAMP_DJ[2], 4);
  145.  
  146.     _SAMP_DJ[3] = CreatePlayerTextDraw(playerid, 255.888885, 125.944450, "usebox");
  147.     PlayerTextDrawLetterSize(playerid, _SAMP_DJ[3], 0.000000, 3.485800);
  148.     PlayerTextDrawTextSize(playerid, _SAMP_DJ[3], 138.555557, 0.000000);
  149.     PlayerTextDrawAlignment(playerid, _SAMP_DJ[3], 1);
  150.     PlayerTextDrawColor(playerid, _SAMP_DJ[3], 0);
  151.     PlayerTextDrawUseBox(playerid, _SAMP_DJ[3], true);
  152.     PlayerTextDrawBoxColor(playerid, _SAMP_DJ[3], 102);
  153.     PlayerTextDrawSetShadow(playerid, _SAMP_DJ[3], 0);
  154.     PlayerTextDrawSetOutline(playerid, _SAMP_DJ[3], 0);
  155.     PlayerTextDrawFont(playerid, _SAMP_DJ[3], 0);
  156.  
  157.     _SAMP_DJ[4] = CreatePlayerTextDraw(playerid, 253.111114, 129.055557, "usebox");
  158.     PlayerTextDrawLetterSize(playerid, _SAMP_DJ[4], 0.000000, 2.856172);
  159.     PlayerTextDrawTextSize(playerid, _SAMP_DJ[4], 140.777770, 0.000000);
  160.     PlayerTextDrawAlignment(playerid, _SAMP_DJ[4], 1);
  161.     PlayerTextDrawColor(playerid, _SAMP_DJ[4], -2147483393);
  162.     PlayerTextDrawUseBox(playerid, _SAMP_DJ[4], true);
  163.     PlayerTextDrawBoxColor(playerid, _SAMP_DJ[4], -2147483393);
  164.     PlayerTextDrawSetShadow(playerid, _SAMP_DJ[4], 0);
  165.     PlayerTextDrawSetOutline(playerid, _SAMP_DJ[4], 0);
  166.     PlayerTextDrawFont(playerid, _SAMP_DJ[4], 0);
  167.  
  168.     _SAMP_DJ[5] = CreatePlayerTextDraw(playerid, 150.555557, 133.259262, "SAMP DJ");
  169.     PlayerTextDrawLetterSize(playerid, _SAMP_DJ[5], 0.498333, 1.807406);
  170.     PlayerTextDrawAlignment(playerid, _SAMP_DJ[5], 1);
  171.     PlayerTextDrawColor(playerid, _SAMP_DJ[5], -1);
  172.     PlayerTextDrawSetShadow(playerid, _SAMP_DJ[5], 0);
  173.     PlayerTextDrawSetOutline(playerid, _SAMP_DJ[5], 1);
  174.     PlayerTextDrawBackgroundColor(playerid, _SAMP_DJ[5], 51);
  175.     PlayerTextDrawFont(playerid, _SAMP_DJ[5], 2);
  176.     PlayerTextDrawSetProportional(playerid, _SAMP_DJ[5], 1);
  177.  
  178.     _SAMP_DJ[6] = CreatePlayerTextDraw(playerid, 176.666625, 213.629699, "hud:sitem16");
  179.     PlayerTextDrawLetterSize(playerid, _SAMP_DJ[6], 0.000000, 0.000000);
  180.     PlayerTextDrawTextSize(playerid, _SAMP_DJ[6], 37.777778, 67.925895);
  181.     PlayerTextDrawAlignment(playerid, _SAMP_DJ[6], 1);
  182.     PlayerTextDrawColor(playerid, _SAMP_DJ[6], -1);
  183.     PlayerTextDrawSetShadow(playerid, _SAMP_DJ[6], 0);
  184.     PlayerTextDrawSetOutline(playerid, _SAMP_DJ[6], 0);
  185.     PlayerTextDrawFont(playerid, _SAMP_DJ[6], 4);
  186.  
  187.     _SAMP_DJ[7] = CreatePlayerTextDraw(playerid, 372.777832, 210.518493, "hud:sitem16");
  188.     PlayerTextDrawLetterSize(playerid, _SAMP_DJ[7], 0.000000, 0.000000);
  189.     PlayerTextDrawTextSize(playerid, _SAMP_DJ[7], 42.777763, 65.851837);
  190.     PlayerTextDrawAlignment(playerid, _SAMP_DJ[7], 1);
  191.     PlayerTextDrawColor(playerid, _SAMP_DJ[7], -1);
  192.     PlayerTextDrawSetShadow(playerid, _SAMP_DJ[7], 0);
  193.     PlayerTextDrawSetOutline(playerid, _SAMP_DJ[7], 0);
  194.     PlayerTextDrawFont(playerid, _SAMP_DJ[7], 4);
  195.  
  196.     _SAMP_DJ[8] = CreatePlayerTextDraw(playerid, 197.777770, 261.333312, "ld_pool:ball");
  197.     PlayerTextDrawLetterSize(playerid, _SAMP_DJ[8], 0.000000, 0.000000);
  198.     PlayerTextDrawTextSize(playerid, _SAMP_DJ[8], 29.444437, 30.074056);
  199.     PlayerTextDrawAlignment(playerid, _SAMP_DJ[8], 1);
  200.     PlayerTextDrawColor(playerid, _SAMP_DJ[8], -2147483393);
  201.     PlayerTextDrawSetShadow(playerid, _SAMP_DJ[8], 0);
  202.     PlayerTextDrawSetOutline(playerid, _SAMP_DJ[8], 0);
  203.     PlayerTextDrawFont(playerid, _SAMP_DJ[8], 4);
  204.  
  205.     _SAMP_DJ[9] = CreatePlayerTextDraw(playerid, 399.444427, 257.703674, "ld_pool:ball");
  206.     PlayerTextDrawLetterSize(playerid, _SAMP_DJ[9], 0.000000, 0.000000);
  207.     PlayerTextDrawTextSize(playerid, _SAMP_DJ[9], 29.999990, 29.037012);
  208.     PlayerTextDrawAlignment(playerid, _SAMP_DJ[9], 1);
  209.     PlayerTextDrawColor(playerid, _SAMP_DJ[9], -2147483393);
  210.     PlayerTextDrawSetShadow(playerid, _SAMP_DJ[9], 0);
  211.     PlayerTextDrawSetOutline(playerid, _SAMP_DJ[9], 0);
  212.     PlayerTextDrawFont(playerid, _SAMP_DJ[9], 4);
  213.  
  214.     _SAMP_DJ[10] = CreatePlayerTextDraw(playerid, 380.888885, 186.611114, "usebox");
  215.     PlayerTextDrawLetterSize(playerid, _SAMP_DJ[10], 0.000000, 1.354114);
  216.     PlayerTextDrawTextSize(playerid, _SAMP_DJ[10], 228.000000, 0.000000);
  217.     PlayerTextDrawAlignment(playerid, _SAMP_DJ[10], 1);
  218.     PlayerTextDrawColor(playerid, _SAMP_DJ[10], 0);
  219.     PlayerTextDrawUseBox(playerid, _SAMP_DJ[10], true);
  220.     PlayerTextDrawBoxColor(playerid, _SAMP_DJ[10], 102);
  221.     PlayerTextDrawSetShadow(playerid, _SAMP_DJ[10], 0);
  222.     PlayerTextDrawSetOutline(playerid, _SAMP_DJ[10], 0);
  223.     PlayerTextDrawFont(playerid, _SAMP_DJ[10], 2);
  224.  
  225.     _SAMP_DJ[11] = CreatePlayerTextDraw(playerid, 235.555526, 188.740722, "Choose your Music");
  226.     PlayerTextDrawLetterSize(playerid, _SAMP_DJ[11], 0.262222, 0.910371);
  227.     PlayerTextDrawTextSize(playerid, _SAMP_DJ[11], 373.888732, 15.833328);
  228.     PlayerTextDrawAlignment(playerid, _SAMP_DJ[11], 1);
  229.     PlayerTextDrawColor(playerid, _SAMP_DJ[11], -1061109505);
  230.     PlayerTextDrawUseBox(playerid, _SAMP_DJ[11], true);
  231.     PlayerTextDrawBoxColor(playerid, _SAMP_DJ[11], 471604479);
  232.     PlayerTextDrawSetShadow(playerid, _SAMP_DJ[11], 0);
  233.     PlayerTextDrawSetOutline(playerid, _SAMP_DJ[11], 1);
  234.     PlayerTextDrawBackgroundColor(playerid, _SAMP_DJ[11], 471604479);
  235.     PlayerTextDrawFont(playerid, _SAMP_DJ[11], 1);
  236.     PlayerTextDrawSetProportional(playerid, _SAMP_DJ[11], 1);
  237.     PlayerTextDrawSetSelectable(playerid, _SAMP_DJ[11], true);
  238.  
  239.     _SAMP_DJ[12] = CreatePlayerTextDraw(playerid, 317.777282, 209.999908, "Play");
  240.     PlayerTextDrawLetterSize(playerid, _SAMP_DJ[12], 0.288332, 1.039999);
  241.     PlayerTextDrawTextSize(playerid, _SAMP_DJ[12], 339.444580, 15.833328);
  242.     PlayerTextDrawAlignment(playerid, _SAMP_DJ[12], 1);
  243.     PlayerTextDrawColor(playerid, _SAMP_DJ[12], 471604479);
  244.     PlayerTextDrawUseBox(playerid, _SAMP_DJ[12], true);
  245.     PlayerTextDrawBoxColor(playerid, _SAMP_DJ[12], 471604479);
  246.     PlayerTextDrawSetShadow(playerid, _SAMP_DJ[12], 0);
  247.     PlayerTextDrawSetOutline(playerid, _SAMP_DJ[12], 1);
  248.     PlayerTextDrawBackgroundColor(playerid, _SAMP_DJ[12], 255);
  249.     PlayerTextDrawFont(playerid, _SAMP_DJ[12], 3);
  250.     PlayerTextDrawSetProportional(playerid, _SAMP_DJ[12], 1);
  251.     PlayerTextDrawSetSelectable(playerid, _SAMP_DJ[12], true);
  252.  
  253.     _SAMP_DJ[13] = CreatePlayerTextDraw(playerid, 265.000122, 209.999984, "Stop");
  254.     PlayerTextDrawLetterSize(playerid, _SAMP_DJ[13], 0.304443, 1.060740);
  255.     PlayerTextDrawTextSize(playerid, _SAMP_DJ[13], 292.222290, 15.833328);
  256.     PlayerTextDrawAlignment(playerid, _SAMP_DJ[13], 1);
  257.     PlayerTextDrawColor(playerid, _SAMP_DJ[13], 471604479);
  258.     PlayerTextDrawUseBox(playerid, _SAMP_DJ[13], true);
  259.     PlayerTextDrawBoxColor(playerid, _SAMP_DJ[13], 471604479);
  260.     PlayerTextDrawSetShadow(playerid, _SAMP_DJ[13], 0);
  261.     PlayerTextDrawSetOutline(playerid, _SAMP_DJ[13], 1);
  262.     PlayerTextDrawBackgroundColor(playerid, _SAMP_DJ[13], 255);
  263.     PlayerTextDrawFont(playerid, _SAMP_DJ[13], 3);
  264.     PlayerTextDrawSetProportional(playerid, _SAMP_DJ[13], 1);
  265.     PlayerTextDrawSetSelectable(playerid, _SAMP_DJ[13], true);
  266.  
  267.     return 1;
  268. }
  269.  
  270. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement