Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function createText ( )
- me=getLocalPlayer()
- ping=getPlayerPing(me)
- ping1=tostring(ping)
- text1="Ping"
- if isPedInVehicle(me) then
- local vehicle=getPedOccupiedVehicle(me)
- veh=getVehicleName(vehicle)
- vehn=tostring(veh)
- vehz=getElementHealth(vehicle)
- vehhp=gettok(tostring(vehz), 1, string.byte('.'))
- text2="Position"
- x,y,z=getElementPosition(vehicle)
- x1=gettok(tostring(x), 1, string.byte('.'))
- y1=gettok(tostring(y), 1, string.byte('.'))
- z1=gettok(tostring(z), 1, string.byte('.'))
- text3="Colors"
- c1,c2,c3,c4=getVehicleColor(vehicle)
- c=tostring(c1)
- cc=tostring(c2)
- ccc=tostring(c3)
- cccc=tostring(c4)
- dxDrawText( text1, 220, screenHeight-41, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 2.04, "arial" )
- dxDrawText( ping1, 280, screenHeight-54, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 2.04, "pricedown" ) -- Draw Zone Name text shadow.
- dxDrawText( ping1, 280, screenHeight-52, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 2, "pricedown" )
- dxDrawText( vehn, 340, screenHeight-41, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 2, "arial" )
- dxDrawText( vehhp, 340, screenHeight-94, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 2.04, "pricedown" )
- dxDrawText( vehhp, 340, screenHeight-92, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 2, "pricedown" )
- dxDrawText( text2, 460, screenHeight-41, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 2, "arial" )
- dxDrawText( x1, 460, screenHeight-82, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 0.75, "pricedown" )
- dxDrawText( y1, 500, screenHeight-69, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 0.75, "pricedown")
- dxDrawText( z1, 540, screenHeight-57, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 0.75, "pricedown")
- dxDrawText( text3, 580, screenHeight-41, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 2, "arial")
- dxDrawText( c, 580, screenHeight-82, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 0.85, "pricedown")
- dxDrawText( cc, 600, screenHeight-72, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 0.85, "pricedown")
- dxDrawText( ccc, 624, screenHeight-58, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 0.85, "pricedown")
- dxDrawText( cccc, 640, screenHeight-52, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 0.85, "pricedown")
- end
- end
- function HandleTheRendering()
- addEventHandler("onClientRender",rootElement, createText) -- keep the text visible with onClientRender.
- end
- addEventHandler("onClientResourceStart",rootElement, HandleTheRendering)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement