Advertisement
Guest User

[INC]Movable3DText by _TeraN_

a guest
Mar 31st, 2011
728
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.52 KB | None | 0 0
  1. new Text3D:textue[250], txtid, tcolor[sizeof(textue)], stringetc1[256][sizeof(textue)], texton3dtext[256][sizeof(textue)];
  2.  
  3. stock CreateMoveable3DText(string[], speed, color, Float:distance, Float:x, Float:y, Float:z, virtualworld, testLOS)
  4. {
  5.     if(txtid < sizeof(textue))
  6.     {
  7.         if(speed < 1) return printf("Maximum Moveable 3DText's - %d", sizeof(textue));
  8.         txtid++;
  9.         tcolor[txtid] = color;
  10.         format(texton3dtext[txtid], sizeof(texton3dtext), string);
  11.         textue[txtid] = Create3DTextLabel(texton3dtext[txtid], tcolor[txtid], x,y,z, distance, virtualworld, testLOS);
  12.         SetTimerEx("Move3DText", speed*100, true, "i",txtid);
  13.     }
  14.     return true;
  15. }
  16.  
  17. stock AttachMoveable3DTextToVehicle(string[], speed, color, Float:distance, vehid, Float:x, Float:y, Float:z, virtualworld, testLOS)
  18. {
  19.     if(txtid < sizeof(textue))
  20.     {
  21.         if(speed < 1) return printf("Maximum Moveable 3DText's - %d", sizeof(textue));
  22.         txtid++;
  23.         tcolor[txtid] = color;
  24.         format(texton3dtext[txtid], sizeof(texton3dtext), string);
  25.         textue[txtid] = Create3DTextLabel(texton3dtext[txtid], tcolor[txtid], x,y,z, distance, virtualworld, testLOS);
  26.         Attach3DTextLabelToVehicle(textue[txtid], vehid, x, y, z);
  27.         SetTimerEx("Move3DText", speed*100, true, "i",txtid);
  28.     }
  29.     return true;
  30. }
  31.  
  32. forward Move3DText(txtid2);
  33. public Move3DText(txtid2)
  34. {
  35.     format(stringetc1[txtid2], 2, "%c", texton3dtext[txtid2]);
  36.     strdel(texton3dtext[txtid2], 0, 1);
  37.     strcat(texton3dtext[txtid2], stringetc1[txtid2]);
  38.     Update3DTextLabelText(textue[txtid2], tcolor[txtid2], texton3dtext[txtid2]);
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement