Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. function createText ( )
  2. me=getLocalPlayer()
  3. ping=getPlayerPing(me)
  4. ping1=tostring(ping)
  5. text1="Ping"
  6. if isPedInVehicle(me) then
  7. local vehicle=getPedOccupiedVehicle(me)
  8.  
  9. veh=getVehicleName(vehicle)
  10. vehn=tostring(veh)
  11. vehz=getElementHealth(vehicle)
  12. vehhp=gettok(tostring(vehz), 1, string.byte('.'))
  13. text2="Position"
  14. x,y,z=getElementPosition(vehicle)
  15. x1=gettok(tostring(x), 1, string.byte('.'))
  16. y1=gettok(tostring(y), 1, string.byte('.'))
  17. z1=gettok(tostring(z), 1, string.byte('.'))
  18. text3="Colors"
  19. c1,c2,c3,c4=getVehicleColor(vehicle)
  20. c=tostring(c1)
  21. cc=tostring(c2)
  22. ccc=tostring(c3)
  23. cccc=tostring(c4)
  24.  
  25. dxDrawText( text1, 220, screenHeight-41, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 2.04, "arial" )
  26. dxDrawText( ping1, 280, screenHeight-54, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 2.04, "pricedown" ) -- Draw Zone Name text shadow.
  27. dxDrawText( ping1, 280, screenHeight-52, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 2, "pricedown" )
  28. dxDrawText( vehn, 340, screenHeight-41, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 2, "arial" )
  29. dxDrawText( vehhp, 340, screenHeight-94, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 2.04, "pricedown" )
  30. dxDrawText( vehhp, 340, screenHeight-92, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 2, "pricedown" )
  31. dxDrawText( text2, 460, screenHeight-41, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 2, "arial" )
  32. dxDrawText( x1, 460, screenHeight-82, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 0.75, "pricedown" )
  33. dxDrawText( y1, 500, screenHeight-69, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 0.75, "pricedown")
  34. dxDrawText( z1, 540, screenHeight-57, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 0.75, "pricedown")
  35. dxDrawText( text3, 580, screenHeight-41, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 2, "arial")
  36. dxDrawText( c, 580, screenHeight-82, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 0.85, "pricedown")
  37. dxDrawText( cc, 600, screenHeight-72, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 0.85, "pricedown")
  38. dxDrawText( ccc, 624, screenHeight-58, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 0.85, "pricedown")
  39. dxDrawText( cccc, 640, screenHeight-52, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 0.85, "pricedown")
  40.  
  41.  
  42.  
  43. end
  44. end
  45.  
  46. function HandleTheRendering()
  47. addEventHandler("onClientRender",rootElement, createText) -- keep the text visible with onClientRender.
  48. end
  49. addEventHandler("onClientResourceStart",rootElement, HandleTheRendering)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement