Advertisement
OtaconEvil

[INC] O_TextoMovible

Jul 9th, 2013
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.91 KB | None | 0 0
  1.  
  2. /*
  3.     INCLUDES: O_TextoMovible.
  4.     AUTOR: Otacon.
  5. */
  6.  
  7. #define MAX_CARACTERES (100)
  8. #define MAX_MOVIBLE (1)
  9. static
  10.     strtexto[MAX_CARACTERES],
  11.     texto[MAX_CARACTERES][MAX_MOVIBLE],
  12.     posicion[MAX_MOVIBLE] = 0,
  13.     Text3D:Label[MAX_MOVIBLE],
  14.     ChauTexto[MAX_MOVIBLE],
  15.     color[MAX_MOVIBLE];
  16.  
  17. /*
  18.     native CrearTextoMovible(textolabel[], colorlabel, timer, array, Float:x, Float:y, Float:z, Float:distancia)
  19.     native TerminarTextoMovible(array)
  20. */
  21. stock CrearTextoMovible(textolabel[], colorlabel, timer, array, Float:x, Float:y, Float:z, Float:distancia) {
  22.     color[array] = colorlabel;
  23.     Label[array] = Create3DTextLabel(textolabel, color[array], x,y,z, distancia, 0, 0);
  24.     ChauTexto[array] = SetTimerEx("MoverTexto", timer, true, "d", array);
  25.     format(texto[array], MAX_CARACTERES, "%s", textolabel);
  26. }
  27. stock TerminarTextoMovible(array) {
  28.     KillTimer(ChauTexto[array]);
  29.     Delete3DTextLabel(Label[array);
  30.     color[array] = -1;
  31.     posicion[array]=0;
  32. }
  33. forward MoverTexto(arrayid);
  34. public MoverTexto(arrayid) {
  35.     if(posicion[arrayid] == 0) {
  36.         posicion[arrayid]++;
  37.         format(strtexto, sizeof(strtexto), "          %s", texto[arrayid]);
  38.         Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
  39.     } else if(posicion[arrayid] == 1) {
  40.         posicion[arrayid]++;
  41.         format(strtexto, sizeof(strtexto), "                    %s", texto[arrayid]);
  42.         Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
  43.     } else if(posicion[arrayid] == 2) {
  44.         posicion[arrayid]++;
  45.         format(strtexto, sizeof(strtexto), "                              %s", texto[arrayid]);
  46.         Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
  47.     } else if(posicion[arrayid] == 3) {
  48.         posicion[arrayid]++;
  49.         format(strtexto, sizeof(strtexto), "                                        %s", texto[arrayid]);
  50.         Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
  51.     } else if(posicion[arrayid] == 4) {
  52.         posicion[arrayid]++;
  53.         format(strtexto, sizeof(strtexto), "                                                  %s", texto[arrayid]);
  54.         Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
  55.     } else if(posicion[arrayid] == 5) {
  56.         posicion[arrayid]++;
  57.         format(strtexto, sizeof(strtexto), "                                                            %s", texto[arrayid]);
  58.         Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
  59.     } else if(posicion[arrayid] == 6) {
  60.         posicion[arrayid]++;
  61.         format(strtexto, sizeof(strtexto), "                                                                      %s", texto[arrayid]);
  62.         Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
  63.     } else if(posicion[arrayid] == 7) {
  64.         posicion[arrayid]++;
  65.         format(strtexto, sizeof(strtexto), "                                                                                %s", texto[arrayid]);
  66.         Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
  67.     } else if(posicion[arrayid] == 8) {
  68.         posicion[arrayid]++;
  69.         format(strtexto, sizeof(strtexto), "                                                                                          %s", texto[arrayid]);
  70.         Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
  71.     } else if(posicion[arrayid] == 9) {
  72.         posicion[arrayid]++;
  73.         format(strtexto, sizeof(strtexto), "                                                                                                    %s", texto[arrayid]);
  74.         Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
  75.     } else if(posicion[arrayid] == 10) {
  76.         posicion[arrayid]=0;
  77.         format(strtexto, sizeof(strtexto), "%s", texto[arrayid]);
  78.         Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
  79.     }
  80. }
  81.  
  82. /*
  83.     INCLUDES: O_TextoMovible.
  84.     AUTOR: Otacon.
  85. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement