sajunga Posted September 20, 2012 Share Posted September 20, 2012 (edited) What is wrong? addEventHandler('onClientRender',g_Root,function() dxDrawText("Lithuania rp", screenWidth-200, 0, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1, "pricedown") dxDrawText("Lithuania rp", screenWidth-197.2, 2.8, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown") dxDrawLine(screenWidth-200, 32, screenWidth, 32, tocolor(255, 255, 255, 255), 2) end end Edited September 20, 2012 by Guest Link to comment
TAPL Posted September 20, 2012 Share Posted September 20, 2012 You have extra "end" and you have missed the bracket of the event, also i don't see where g_Root - screenWidth - screenHeight is defined. And please next time use lua button not Code. Link to comment
DiSaMe Posted September 20, 2012 Share Posted September 20, 2012 Use root instead of g_Root. To get screenWidth and screenHeight, use this function: guiGetScreenSize Link to comment
Entity Posted September 20, 2012 Share Posted September 20, 2012 function updateCamera () screenWidth,screenHeight = guiGetScreenSize() dxDrawText("Lithuania rp", screenWidth-200, 0, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1, "pricedown") dxDrawText("Lithuania rp", screenWidth-197.2, 2.8, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown") dxDrawLine(screenWidth-200, 32, screenWidth, 32, tocolor(255, 255, 255, 255), 2) end addEventHandler ( "onClientRender", getRootElement(), updateCamera ) 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