Noneatme

Untitled

Feb 16th, 2012
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.06 KB | None | 0 0
  1. ---------------------------------|
  2. -- 3D Text Funktion bei MuLTi! --|
  3. ---------------------------------|
  4.  
  5. function create3DText(text, x, y, z, r, g, b, thick, view, line, double, dr, dg, db)
  6. addEventHandler("onClientRender", getRootElement(),
  7.     function()
  8.         local xp, yp, zp = getElementPosition( gMe )
  9.         local x1, y1, z1 = getScreenFromWorldPosition( x, y, z)
  10.         if(getDistanceBetweenPoints3D(  x, y, z, xp, yp, zp ) < view) and (x1) then
  11.             if(line == true) then
  12.                 if(isLineOfSightClear(x, y, z, xp, yp, zp, true, true, false, false, false, false, false)) then
  13.                     if(double == true) then
  14.                         dxDrawText (text, x1-1, y1 -41, x1-1, y1-1, tocolor ( dr, dg, db, 255 ), thick, "default-bold")
  15.                     end
  16.                     dxDrawText (text, x1, y1 -40, x1, y1, tocolor ( r, g, b, 255 ), thick, "default-bold")
  17.                 end
  18.             else
  19.                 if(double == true) then
  20.                     dxDrawText (text, x1-1, y1 -41, x1-1, y1-1, tocolor ( dr, dg, db, 255 ), thick, "default-bold")
  21.                 end
  22.                 dxDrawText (text, x1, y1 -40, x1, y1, tocolor ( r, g, b, 255 ), thick, "default-bold")
  23.             end
  24.         end
  25.     end)
  26. end
Advertisement
Add Comment
Please, Sign In to add comment