Advertisement
OtaconEvil

[FS] Simple Anuncios Dinamicos 'TextDraw' By OTACON

Jul 15th, 2013
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 8.65 KB | None | 0 0
  1. /*
  2.               Prohibido TOTALMENTE el Robo de Créditos o la
  3.              Publicación de este FILTERSCRIPT sin Mi Permiso.
  4.  
  5.     SIMPLE FILTERSCRIPT --> Simple Anuncios Dinamicos 'TextDraw'
  6.     CREDITOS: OTACON ;)
  7.     NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
  8. */
  9. #include <a_samp>
  10. new NivelAnunciosTD=0;
  11. new MatarAnunciosTD;
  12. new Text:TDDinamicos[MAX_PLAYERS][2];
  13.  
  14. enum enumanuncios {
  15.     TituloAnuncio[100],
  16.     TextoAnuncio[100], };
  17. new ListaAnuncio[10][enumanuncios] = {
  18. {"~g~[Here is a Title 1]", "~g~entering text here."}, //Maximum Characters - Title = 21 - Text = 25
  19. {"~p~[Here is a Title 2]", "~w~entering text here."},
  20. {"~p~[Here is a Title 3]", "~w~entering text here."},
  21. {"~p~[Here is a Title 4]", "~w~entering text here."},
  22. {"~p~[Here is a Title 5]", "~w~entering text here."},
  23. {"~p~[Here is a Title 6]", "~w~entering text here."},
  24. {"~p~[Here is a Title 7]", "~w~entering text here."},
  25. {"~p~[Here is a Title 8]", "~w~entering text here."},
  26. {"~p~[Here is a Title 9]", "~w~entering text here."},
  27. {"~p~[Here is a Title 10]", "~w~entering text here."} };
  28.    
  29. public OnFilterScriptInit() {
  30.     print("\n**************************************");
  31.     print("   Simple Anuncios Dinamicos 'TextDraw' ");
  32.     print("           Fecha: 15/07/2013            ");
  33.     print("             Autor: OTACON              ");
  34.     print("      --* Cargado con Exito!!. *--      ");
  35.     print("***************************************\n");
  36.     MatarAnunciosTD=SetTimer("TimerAnuncios", 1*1000, true);
  37.     return true;
  38. }
  39. public OnFilterScriptExit() {
  40.     print("\n**************************************");
  41.     print("   Simple Anuncios Dinamicos 'TextDraw' ");
  42.     print("           Fecha: 15/07/2013            ");
  43.     print("             Autor: OTACON              ");
  44.     print("     --* Descargado con Exito!!. *--    ");
  45.     print("***************************************\n");
  46.     KillTimer(MatarAnunciosTD);
  47.     return true;
  48. }
  49. public OnPlayerConnect(playerid) {
  50.     TDDinamicos[playerid][0]=TextDrawCreate(385.000000, 347.000000, "_");
  51.     TextDrawAlignment(TDDinamicos[playerid][0], 2);
  52.     TextDrawBackgroundColor(TDDinamicos[playerid][0], 255);
  53.     TextDrawFont(TDDinamicos[playerid][0], 1);
  54.     TextDrawLetterSize(TDDinamicos[playerid][0], 0.290000, 1.700001);
  55.     TextDrawColor(TDDinamicos[playerid][0], -1);
  56.     TextDrawSetOutline(TDDinamicos[playerid][0], 1);
  57.     TextDrawSetProportional(TDDinamicos[playerid][0], 1);
  58.     TextDrawUseBox(TDDinamicos[playerid][0], 1);
  59.     TextDrawBoxColor(TDDinamicos[playerid][0], 0x00000055);
  60.     TextDrawTextSize(TDDinamicos[playerid][0], 5.000000, 485.000000);
  61.     TextDrawSetSelectable(TDDinamicos[playerid][0], 0);
  62.    
  63.     TDDinamicos[playerid][1]=TextDrawCreate(234.000000, 315.000000, "~w~ - Simple Dynamic Ads - ~n~~y~ By OTACON");
  64.     TextDrawAlignment(TDDinamicos[playerid][1], 2);
  65.     TextDrawBackgroundColor(TDDinamicos[playerid][1], 255);
  66.     TextDrawFont(TDDinamicos[playerid][1], 1);
  67.     TextDrawLetterSize(TDDinamicos[playerid][1], 0.329999, 1.500000);
  68.     TextDrawColor(TDDinamicos[playerid][1], -1);
  69.     TextDrawSetOutline(TDDinamicos[playerid][1], 1);
  70.     TextDrawSetProportional(TDDinamicos[playerid][1], 1);
  71.     TextDrawSetSelectable(TDDinamicos[playerid][1], 0);
  72.     return true;
  73. }
  74. public OnPlayerSpawn(playerid) {
  75.     TextDrawShowForPlayer(playerid,TDDinamicos[playerid][0]);
  76.     TextDrawShowForPlayer(playerid,TDDinamicos[playerid][1]);
  77.     return true;
  78. }
  79. public OnPlayerDisconnect(playerid, reason) {
  80.     TextDrawHideForPlayer(playerid,TDDinamicos[playerid][0]);
  81.     TextDrawDestroy(TDDinamicos[playerid][0]);
  82.     TextDrawHideForPlayer(playerid,TDDinamicos[playerid][1]);
  83.     TextDrawDestroy(TDDinamicos[playerid][1]);
  84.     return true;
  85. }
  86. forward TimerAnuncios();
  87. public TimerAnuncios() {
  88.     new str[400];
  89.     for(new playerid=0; playerid<GetMaxPlayers(); playerid++) {
  90.         if(!IsPlayerConnected(playerid)) continue;
  91.         if(IsPlayerNPC(playerid)) continue;
  92.         switch(NivelAnunciosTD) {
  93.             case 0: {
  94.                 NivelAnunciosTD++;
  95.                 format(str, sizeof(str), "%s %s ~n~%s %s ~n~%s %s ~n~%s %s ~n~%s %s \
  96.                 ", ListaAnuncio[1][TituloAnuncio], ListaAnuncio[1][TextoAnuncio], ListaAnuncio[2][TituloAnuncio], ListaAnuncio[2][TextoAnuncio], ListaAnuncio[3][TituloAnuncio],
  97.                 ListaAnuncio[3][TextoAnuncio], ListaAnuncio[4][TituloAnuncio], ListaAnuncio[4][TextoAnuncio], ListaAnuncio[5][TituloAnuncio], ListaAnuncio[5][TextoAnuncio] );
  98.                 TextDrawSetString(TDDinamicos[playerid][0], str);
  99.             } case 1: {
  100.                 NivelAnunciosTD++;
  101.                 format(str, sizeof(str), "%s %s ~n~%s %s ~n~%s %s ~n~%s %s ~n~%s %s \
  102.                 ", ListaAnuncio[2][TituloAnuncio], ListaAnuncio[2][TextoAnuncio], ListaAnuncio[3][TituloAnuncio], ListaAnuncio[3][TextoAnuncio], ListaAnuncio[4][TituloAnuncio],
  103.                 ListaAnuncio[4][TextoAnuncio], ListaAnuncio[5][TituloAnuncio], ListaAnuncio[5][TextoAnuncio], ListaAnuncio[6][TituloAnuncio], ListaAnuncio[6][TextoAnuncio] );
  104.                 TextDrawSetString(TDDinamicos[playerid][0], str);
  105.             } case 2: {
  106.                 NivelAnunciosTD++;
  107.                 format(str, sizeof(str), "%s %s ~n~%s %s ~n~%s %s ~n~%s %s ~n~%s %s \
  108.                 ", ListaAnuncio[3][TituloAnuncio], ListaAnuncio[3][TextoAnuncio], ListaAnuncio[4][TituloAnuncio], ListaAnuncio[4][TextoAnuncio], ListaAnuncio[5][TituloAnuncio],
  109.                 ListaAnuncio[5][TextoAnuncio], ListaAnuncio[6][TituloAnuncio], ListaAnuncio[6][TextoAnuncio], ListaAnuncio[7][TituloAnuncio], ListaAnuncio[7][TextoAnuncio] );
  110.                 TextDrawSetString(TDDinamicos[playerid][0], str);
  111.             } case 3: {
  112.                 NivelAnunciosTD++;
  113.                 format(str, sizeof(str), "%s %s ~n~%s %s ~n~%s %s ~n~%s %s ~n~%s %s \
  114.                 ", ListaAnuncio[4][TituloAnuncio], ListaAnuncio[4][TextoAnuncio], ListaAnuncio[5][TituloAnuncio], ListaAnuncio[5][TextoAnuncio], ListaAnuncio[6][TituloAnuncio],
  115.                 ListaAnuncio[6][TextoAnuncio], ListaAnuncio[7][TituloAnuncio], ListaAnuncio[7][TextoAnuncio], ListaAnuncio[8][TituloAnuncio], ListaAnuncio[8][TextoAnuncio] );
  116.                 TextDrawSetString(TDDinamicos[playerid][0], str);
  117.             } case 4: {
  118.                 NivelAnunciosTD++;
  119.                 format(str, sizeof(str), "%s %s ~n~%s %s ~n~%s %s ~n~%s %s ~n~%s %s \
  120.                 ", ListaAnuncio[5][TituloAnuncio], ListaAnuncio[5][TextoAnuncio], ListaAnuncio[6][TituloAnuncio], ListaAnuncio[6][TextoAnuncio], ListaAnuncio[7][TituloAnuncio],
  121.                 ListaAnuncio[7][TextoAnuncio], ListaAnuncio[8][TituloAnuncio], ListaAnuncio[8][TextoAnuncio], ListaAnuncio[9][TituloAnuncio], ListaAnuncio[9][TextoAnuncio] );
  122.                 TextDrawSetString(TDDinamicos[playerid][0], str);
  123.             } case 5: {
  124.                 NivelAnunciosTD++;
  125.                 format(str, sizeof(str), "%s %s ~n~%s %s ~n~%s %s ~n~%s %s ~n~%s %s \
  126.                 ", ListaAnuncio[6][TituloAnuncio], ListaAnuncio[6][TextoAnuncio], ListaAnuncio[7][TituloAnuncio], ListaAnuncio[7][TextoAnuncio], ListaAnuncio[8][TituloAnuncio],
  127.                 ListaAnuncio[8][TextoAnuncio], ListaAnuncio[9][TituloAnuncio], ListaAnuncio[9][TextoAnuncio], ListaAnuncio[0][TituloAnuncio], ListaAnuncio[0][TextoAnuncio] );
  128.                 TextDrawSetString(TDDinamicos[playerid][0], str);
  129.             } case 6: {
  130.                 NivelAnunciosTD++;
  131.                 format(str, sizeof(str), "%s %s ~n~%s %s ~n~%s %s ~n~%s %s ~n~%s %s \
  132.                 ", ListaAnuncio[7][TituloAnuncio], ListaAnuncio[7][TextoAnuncio], ListaAnuncio[8][TituloAnuncio], ListaAnuncio[8][TextoAnuncio], ListaAnuncio[9][TituloAnuncio],
  133.                 ListaAnuncio[9][TextoAnuncio], ListaAnuncio[0][TituloAnuncio], ListaAnuncio[0][TextoAnuncio], ListaAnuncio[1][TituloAnuncio], ListaAnuncio[1][TextoAnuncio] );
  134.                 TextDrawSetString(TDDinamicos[playerid][0], str);
  135.             } case 7: {
  136.                 NivelAnunciosTD++;
  137.                 format(str, sizeof(str), "%s %s ~n~%s %s ~n~%s %s ~n~%s %s ~n~%s %s \
  138.                 ", ListaAnuncio[8][TituloAnuncio], ListaAnuncio[8][TextoAnuncio], ListaAnuncio[9][TituloAnuncio], ListaAnuncio[9][TextoAnuncio], ListaAnuncio[0][TituloAnuncio],
  139.                 ListaAnuncio[0][TextoAnuncio], ListaAnuncio[1][TituloAnuncio], ListaAnuncio[1][TextoAnuncio], ListaAnuncio[2][TituloAnuncio], ListaAnuncio[2][TextoAnuncio] );
  140.                 TextDrawSetString(TDDinamicos[playerid][0], str);
  141.             } case 8: {
  142.                 NivelAnunciosTD=0;
  143.                 format(str, sizeof(str), "%s %s ~n~%s %s ~n~%s %s ~n~%s %s ~n~%s %s \
  144.                 ", ListaAnuncio[9][TituloAnuncio], ListaAnuncio[9][TextoAnuncio], ListaAnuncio[0][TituloAnuncio], ListaAnuncio[0][TextoAnuncio], ListaAnuncio[1][TituloAnuncio],
  145.                 ListaAnuncio[1][TextoAnuncio], ListaAnuncio[2][TituloAnuncio], ListaAnuncio[2][TextoAnuncio], ListaAnuncio[3][TituloAnuncio], ListaAnuncio[3][TextoAnuncio] );
  146.                 TextDrawSetString(TDDinamicos[playerid][0], str);
  147.             }
  148.         }
  149.     }
  150.     return true;
  151. }
  152. /*
  153.               Prohibido TOTALMENTE el Robo de Créditos o la
  154.              Publicación de este FILTERSCRIPT sin Mi Permiso.
  155.  
  156.     SIMPLE FILTERSCRIPT --> Simple Anuncios Dinamicos 'TextDraw'
  157.     CREDITOS: OTACON ;)
  158.     NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
  159. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement