AlvarO Posted July 24, 2015 Posted July 24, 2015 Hello guys, today I was making a login panel to my clan but I got a problem that when I want to write inside of the edit, it dosn't work and I don't know what to do, the code is the following one: userBox = guiCreateEdit(476, 361, 334, 29, "", false) Whats bad with that? Can you explain me it pls? Thanks you guys so much MTA:SA SPANISH DEATHMATCH PLAYER
KariiiM Posted July 24, 2015 Posted July 24, 2015 You've to attach your GUI Login in the edit For example: userBox = guiCreateEdit(476, 361, 334, 29, "", false,myWindow)
AlvarO Posted July 25, 2015 Author Posted July 25, 2015 But im not making it GUI, I have a dx panel with all created, buttons and whatever (buttons are dx), but when I create the edit and I want to write inside them I can't MTA:SA SPANISH DEATHMATCH PLAYER
Arnold-1 Posted July 25, 2015 Posted July 25, 2015 Are you able to write in it? if not, make sure your code DOESN'T have this in it: guiSetEnabled(userBox,false) Ingame Name: Arnold If you need my help, contact me on Skype @bshr.ara NOTE:DO NOT ASK ME FOR SCRIPTS, ASK ME FOR HELP
AlvarO Posted July 25, 2015 Author Posted July 25, 2015 I can't write on it and my code dosnt have the thing you said MTA:SA SPANISH DEATHMATCH PLAYER
AlvarO Posted July 25, 2015 Author Posted July 25, 2015 This is the full dxDrawing code: function drawLoginConcept() --Camera setCameraMatrix(358.822265625, -2066.345703125, 28.744483947754, 1500, 500, -850) --Dx --Variables: anim = 0 animacion = anim + 150 --Panel dxDrawRectangle(sX * 0.3570, sY * 0.2676, sX * 0.2867, sY * 0.4961, tocolor(0, 0, 0, login_alpha), false) dxDrawLine(sX * 0.3563, sY * 0.2617, sX * 0.3563, sY * 0.7627, tocolor(255, 60, 50, login_alpha), 2, false) dxDrawLine(sX * 0.3563, sY * 0.7637, sX * 0.6459, sY * 0.7637, tocolor(255, 60, 50, login_alpha), 2, false) dxDrawLine(sX * 0.6445, sY * 0.2607, sX * 0.6445, sY * 0.7630, tocolor(255, 60, 50, login_alpha), 2, false) dxDrawLine(sX * 0.3563, sY * 0.2617, sX * 0.6453, sY * 0.261, tocolor(255, 60, 50, login_alpha), 2, false) --Botones dxDrawRectangle (sX*0.375, sY*0.665, 150, 40,rectanglecchanger1, true) dxDrawRectangle (sX*0.51, sY*0.665, 150, 40, rectanglecchanger2, true) dxDrawRectangle (sX*0.375, sY*0.71, 323, 40, rectanglecchanger3, true) dxDrawRectangle (sX*0.356, sY*0.26, 370, 30, tocolor (255, 60, 50, 255), true) dxDrawRectangle(sX * 0.3575, sY * 0.6426, sX * 0.2859, sY * 0.0117, tocolor(255, 60, 50, 255), false) --Textos dxDrawText ("Register", sX*0.52, sY*0.60, sX/2-300/2+160+140, sY*0.73+40, tocolor (0, 0, 0, login_alpha), 2, "default-bold", "center", "center", false, false, true, true, false) dxDrawText ("Login", sX*0.25, sY*0.60, sX/2-300/2+160+140, sY*0.73+40, tocolor (0, 0, 0, login_alpha), 2, "default-bold", "center", "center", false, false, true, true, false) dxDrawText ("Play as guest", sX*0.385, sY*0.69, sX/2-300/2+160+140, sY*0.73+40, tocolor (0, 0, 0, login_alpha), 2, "default-bold", "center", "center", false, false, true, true, false) dxDrawText ("Login Panel", sX*0.385, sY*(-0.22), sX/2-300/2+160+140, sY*0.73+40, tocolor (0, 0, 0, login_alpha), 2, "default-bold", "center", "center", false, false, true, true, false) dxDrawText ("Username", sX*0.385, sY*(-0.11), sX/2-300/2+160+140, sY*0.73+40, tocolor (255, 60, 50, login_alpha), 2, "default-bold", "center", "center", false, false, true, true, false) dxDrawText ("Password", sX*0.385, sY*(0.111), sX/2-300/2+160+140, sY*0.73+40, tocolor (255, 60, 50, login_alpha), 2, "default-bold", "center", "center", false, false, true, true, false) --Edits boxes and checkbox userBox = guiCreateEdit(476, 361, 334, 29, "", true) passBox = guiCreateEdit(476, 479, 334, 29, "", true) guiEditSetMasked(passBox, true) guiSetEnabled(userBox,true) guiSetEnabled(passBox,true) --Varios showChat(true) showCursor(true) end addEventHandler("onClientRender", root, drawLoginConcept) addEventHandler("onClientResourceStart", resourceRoot, drawLoginConcept) MTA:SA SPANISH DEATHMATCH PLAYER
GTX Posted July 25, 2015 Posted July 25, 2015 Of course. Never put GUI elements into onClientRender event. --Edits boxes and checkbox userBox = guiCreateEdit(476, 361, 334, 29, "", true) passBox = guiCreateEdit(476, 479, 334, 29, "", true) guiEditSetMasked(passBox, true) guiSetEnabled(userBox,true) guiSetEnabled(passBox,true) function drawLoginConcept() --Camera setCameraMatrix(358.822265625, -2066.345703125, 28.744483947754, 1500, 500, -850) --Dx --Variables: anim = 0 animacion = anim + 150 --Panel dxDrawRectangle(sX * 0.3570, sY * 0.2676, sX * 0.2867, sY * 0.4961, tocolor(0, 0, 0, login_alpha), false) dxDrawLine(sX * 0.3563, sY * 0.2617, sX * 0.3563, sY * 0.7627, tocolor(255, 60, 50, login_alpha), 2, false) dxDrawLine(sX * 0.3563, sY * 0.7637, sX * 0.6459, sY * 0.7637, tocolor(255, 60, 50, login_alpha), 2, false) dxDrawLine(sX * 0.6445, sY * 0.2607, sX * 0.6445, sY * 0.7630, tocolor(255, 60, 50, login_alpha), 2, false) dxDrawLine(sX * 0.3563, sY * 0.2617, sX * 0.6453, sY * 0.261, tocolor(255, 60, 50, login_alpha), 2, false) --Botones dxDrawRectangle (sX*0.375, sY*0.665, 150, 40,rectanglecchanger1, true) dxDrawRectangle (sX*0.51, sY*0.665, 150, 40, rectanglecchanger2, true) dxDrawRectangle (sX*0.375, sY*0.71, 323, 40, rectanglecchanger3, true) dxDrawRectangle (sX*0.356, sY*0.26, 370, 30, tocolor (255, 60, 50, 255), true) dxDrawRectangle(sX * 0.3575, sY * 0.6426, sX * 0.2859, sY * 0.0117, tocolor(255, 60, 50, 255), false) --Textos dxDrawText ("Register", sX*0.52, sY*0.60, sX/2-300/2+160+140, sY*0.73+40, tocolor (0, 0, 0, login_alpha), 2, "default-bold", "center", "center", false, false, true, true, false) dxDrawText ("Login", sX*0.25, sY*0.60, sX/2-300/2+160+140, sY*0.73+40, tocolor (0, 0, 0, login_alpha), 2, "default-bold", "center", "center", false, false, true, true, false) dxDrawText ("Play as guest", sX*0.385, sY*0.69, sX/2-300/2+160+140, sY*0.73+40, tocolor (0, 0, 0, login_alpha), 2, "default-bold", "center", "center", false, false, true, true, false) dxDrawText ("Login Panel", sX*0.385, sY*(-0.22), sX/2-300/2+160+140, sY*0.73+40, tocolor (0, 0, 0, login_alpha), 2, "default-bold", "center", "center", false, false, true, true, false) dxDrawText ("Username", sX*0.385, sY*(-0.11), sX/2-300/2+160+140, sY*0.73+40, tocolor (255, 60, 50, login_alpha), 2, "default-bold", "center", "center", false, false, true, true, false) dxDrawText ("Password", sX*0.385, sY*(0.111), sX/2-300/2+160+140, sY*0.73+40, tocolor (255, 60, 50, login_alpha), 2, "default-bold", "center", "center", false, false, true, true, false) --Varios showChat(true) showCursor(true) end addEventHandler("onClientRender", root, drawLoginConcept) Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS. Developer and owner of https://projectbea.st - Project Beast
AlvarO Posted July 25, 2015 Author Posted July 25, 2015 Oh, thanks for the info! But now when I test it, edits dont appear ;v MTA:SA SPANISH DEATHMATCH PLAYER
GTX Posted July 25, 2015 Posted July 25, 2015 Because you set edits to use relative position but you're actually using absolute positions. Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS. Developer and owner of https://projectbea.st - Project Beast
AlvarO Posted July 26, 2015 Author Posted July 26, 2015 Ok thanks I already did it, thanks for the answer! MTA:SA SPANISH DEATHMATCH PLAYER
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