Jump to content

Вывод линии 2D.


Recommended Posts

Не выходит вывеcти линию 2D

function create2DLine ( ) 
local x,y = guiGetScreenSize()  -- Get players resolution. 
  
dxDrawLine ( x/2, y/2-200, x/2, y/2-170, tocolor ( 0, 255, 0, 255 ), 1 )       -- Draw vertical crosshair line. 
dxDrawLine ( x/2-20, y/2-185, x/2+20, y/2-185, tocolor ( 0, 255, 0, 255 ), 1 ) -- Draw horizontal crosshair line. 
end 
  
  
function HandleTheRendering() 
 local rootElement = getRootElement() 
  
addEventHandler("onClientRender",rootElement, create2DLine)  -- Keep the line visible with onClientRender. 
end 
addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...