TorNix~|nR Posted December 2, 2017 Share Posted December 2, 2017 (edited) Guys, how to use this, it's not working the working one is addEventHandler("onClientRender",getRootElement(), but I want it when the playerlogin, help please addEventHandler("onClientPlayerLogin",getRootElement(), ---------- function ( ) local Text = Msg[CreatedMsg+1] dxDrawText(tostring ( Text ), (screenW * 0.0113) - 1, (screenH * 0.9367) - 1, (screenW * 0.4850) - 1, (screenH * 1.0000) - 1, tocolor(0, 0, 0, 255), 1.00, font, "left", "center", true, true, false, true, false) dxDrawText(tostring ( Text ), (screenW * 0.0113) + 1, (screenH * 0.9367) - 1, (screenW * 0.4850) + 1, (screenH * 1.0000) - 1, tocolor(0, 0, 0, 255), 1.00, font, "left", "center", true, true, false, true, false) dxDrawText(tostring ( Text ), (screenW * 0.0113) - 1, (screenH * 0.9367) + 1, (screenW * 0.4850) - 1, (screenH * 1.0000) + 1, tocolor(0, 0, 0, 255), 1.00, font, "left", "center", true, true, false, true, false) dxDrawText(tostring ( Text ), (screenW * 0.0113) + 1, (screenH * 0.9367) + 1, (screenW * 0.4850) + 1, (screenH * 1.0000) + 1, tocolor(0, 0, 0, 255), 1.00, font, "left", "center", true, true, false, true, false) dxDrawText(tostring ( Text ), screenW * 0.0113, screenH * 0.9367, screenW * 0.4850, screenH * 1.0000, tocolor(200, 200, 200, 255), 1.00, font, "left", "center", true, true, false, true, false) end ) Edited December 2, 2017 by TorNix~|nR Link to comment
Bonus Posted December 2, 2017 Share Posted December 2, 2017 Read the infos in the wiki page for dxDrawText. 1 Link to comment
coNolel Posted December 2, 2017 Share Posted December 2, 2017 function dxTxt() local Text = Msg[CreatedMsg+1] dxDrawText(tostring ( Text ), (screenW * 0.0113) - 1, (screenH * 0.9367) - 1, (screenW * 0.4850) - 1, (screenH * 1.0000) - 1, tocolor(0, 0, 0, 255), 1.00, font, "left", "center", true, true, false, true, false) dxDrawText(tostring ( Text ), (screenW * 0.0113) + 1, (screenH * 0.9367) - 1, (screenW * 0.4850) + 1, (screenH * 1.0000) - 1, tocolor(0, 0, 0, 255), 1.00, font, "left", "center", true, true, false, true, false) dxDrawText(tostring ( Text ), (screenW * 0.0113) - 1, (screenH * 0.9367) + 1, (screenW * 0.4850) - 1, (screenH * 1.0000) + 1, tocolor(0, 0, 0, 255), 1.00, font, "left", "center", true, true, false, true, false) dxDrawText(tostring ( Text ), (screenW * 0.0113) + 1, (screenH * 0.9367) + 1, (screenW * 0.4850) + 1, (screenH * 1.0000) + 1, tocolor(0, 0, 0, 255), 1.00, font, "left", "center", true, true, false, true, false) dxDrawText(tostring ( Text ), screenW * 0.0113, screenH * 0.9367, screenW * 0.4850, screenH * 1.0000, tocolor(200, 200, 200, 255), 1.00, font, "left", "center", true, true, false, true, false) end addEventHandler("onClientPlayerLogin",getRootElement(), ---------- function ( ) addEventHandler("onClientRender",root, dxTxt) end ) 1 Link to comment
TorNix~|nR Posted December 2, 2017 Author Share Posted December 2, 2017 @coNolel, not working help please? Link to comment
DiGiTal Posted December 2, 2017 Share Posted December 2, 2017 did you defined the screenW and screenH ??? 1 Link to comment
TorNix~|nR Posted December 2, 2017 Author Share Posted December 2, 2017 Yeah, I fixed it, thank you for help guys 1 Link to comment
DiGiTal Posted December 2, 2017 Share Posted December 2, 2017 (edited) @TorNix~|nRCan i know what is the wrong on the code? Edited December 2, 2017 by DiGiTal 1 Link to comment
TorNix~|nR Posted December 2, 2017 Author Share Posted December 2, 2017 (edited) Well, actually I don't know, it's all about the eventhandler, but I added this code on the login panel, then I used the code while login addEventHandler("onClientRender",root, dxTxt) and it worked fine. Thank you for everything Edited December 2, 2017 by TorNix~|nR 1 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