Sektor Posted November 7, 2011 Share Posted November 7, 2011 Не выходит выве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
MX_Master Posted November 8, 2011 Share Posted November 8, 2011 я так понял, ты этот скрипт на сервере запускал, а не в клиенте? Link to comment
Sektor Posted November 8, 2011 Author Share Posted November 8, 2011 угу тупанул. Теперь все работает. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now