Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- INCLUDES: O_TextoMovible.
- AUTOR: Otacon.
- */
- #define MAX_CARACTERES (100)
- #define MAX_MOVIBLE (1)
- static
- strtexto[MAX_CARACTERES],
- texto[MAX_CARACTERES][MAX_MOVIBLE],
- posicion[MAX_MOVIBLE] = 0,
- Text3D:Label[MAX_MOVIBLE],
- ChauTexto[MAX_MOVIBLE],
- color[MAX_MOVIBLE];
- /*
- native CrearTextoMovible(textolabel[], colorlabel, timer, array, Float:x, Float:y, Float:z, Float:distancia)
- native TerminarTextoMovible(array)
- */
- stock CrearTextoMovible(textolabel[], colorlabel, timer, array, Float:x, Float:y, Float:z, Float:distancia) {
- color[array] = colorlabel;
- Label[array] = Create3DTextLabel(textolabel, color[array], x,y,z, distancia, 0, 0);
- ChauTexto[array] = SetTimerEx("MoverTexto", timer, true, "d", array);
- format(texto[array], MAX_CARACTERES, "%s", textolabel);
- }
- stock TerminarTextoMovible(array) {
- KillTimer(ChauTexto[array]);
- Delete3DTextLabel(Label[array);
- color[array] = -1;
- posicion[array]=0;
- }
- forward MoverTexto(arrayid);
- public MoverTexto(arrayid) {
- if(posicion[arrayid] == 0) {
- posicion[arrayid]++;
- format(strtexto, sizeof(strtexto), " %s", texto[arrayid]);
- Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
- } else if(posicion[arrayid] == 1) {
- posicion[arrayid]++;
- format(strtexto, sizeof(strtexto), " %s", texto[arrayid]);
- Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
- } else if(posicion[arrayid] == 2) {
- posicion[arrayid]++;
- format(strtexto, sizeof(strtexto), " %s", texto[arrayid]);
- Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
- } else if(posicion[arrayid] == 3) {
- posicion[arrayid]++;
- format(strtexto, sizeof(strtexto), " %s", texto[arrayid]);
- Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
- } else if(posicion[arrayid] == 4) {
- posicion[arrayid]++;
- format(strtexto, sizeof(strtexto), " %s", texto[arrayid]);
- Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
- } else if(posicion[arrayid] == 5) {
- posicion[arrayid]++;
- format(strtexto, sizeof(strtexto), " %s", texto[arrayid]);
- Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
- } else if(posicion[arrayid] == 6) {
- posicion[arrayid]++;
- format(strtexto, sizeof(strtexto), " %s", texto[arrayid]);
- Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
- } else if(posicion[arrayid] == 7) {
- posicion[arrayid]++;
- format(strtexto, sizeof(strtexto), " %s", texto[arrayid]);
- Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
- } else if(posicion[arrayid] == 8) {
- posicion[arrayid]++;
- format(strtexto, sizeof(strtexto), " %s", texto[arrayid]);
- Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
- } else if(posicion[arrayid] == 9) {
- posicion[arrayid]++;
- format(strtexto, sizeof(strtexto), " %s", texto[arrayid]);
- Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
- } else if(posicion[arrayid] == 10) {
- posicion[arrayid]=0;
- format(strtexto, sizeof(strtexto), "%s", texto[arrayid]);
- Update3DTextLabelText(Label[arrayid], color[arrayid], strtexto);
- }
- }
- /*
- INCLUDES: O_TextoMovible.
- AUTOR: Otacon.
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement