Mike75 Posted June 9, 2012 Posted June 9, 2012 addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () exports.hud:hidegameinterface() createGUI() end ) -------------------------------------------------GUI--------------------------------------------------------- local BGAlpha = 1.0 function createBG() ---tworzenie tła do interfejsu local width, height = guiGetScreenSize() dxDrawRectangle(0, 0, width, height, tocolor(0, 0, 0, 200 * BGAlpha), false) dxDrawText("DevWorld MTA Project", width - 350,80, width-200, 30, tocolor(255, 255, 255, 200 * BGAlpha), 0.7, "bankgothic", "center", "middle", false, false, false) dxDrawLine(50, height / 4, width - 50, height / 4, tocolor(255, 255, 255, 255), 2, false) dxDrawText("Login", 80, height / 5, 80, height / 5, tocolor(255, 255, 255, 255), 0.7, "bankgothic", "center", "middle", false, false, false) end function createGUI() guiSetInputEnabled(true) addEventHandler("onClientRender", getRootElement(), createBG) showChat(false) fadeCamera(true) setCameraMatrix(1401.4228515625, -887.6865234375, 76.401107788086, 1415.453125, -811.09375, 80.234382629395) createLoginUI() end dxDrawText not working why ?
Mike75 Posted June 9, 2012 Author Posted June 9, 2012 bad argument dxDrawText expect vertical alignt at argument 10 , got string middle
Castillo Posted June 9, 2012 Posted June 9, 2012 Replace "middle" with "center". Next time check the valid alignments at the wiki page.
Mike75 Posted June 9, 2012 Author Posted June 9, 2012 dxDrawText("DevWorld MTA Project", width - 350,80, width-200, 30, tocolor(255, 255, 255, 200 * BGAlpha), 0.7, "bankgothic", [color=#FF0000]"center",[/color] "middle", false, false, false)
Castillo Posted June 9, 2012 Posted June 9, 2012 dxDrawText("DevWorld MTA Project", width - 350,80, width-200, 30, tocolor(255, 255, 255, 200 * BGAlpha), 0.7, "bankgothic", "center", [color=#FF0000]"center"[/color], false, false, false)
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