-
Posts
30 -
Joined
-
Last visited
Everything posted by Senpai
-
yep we would like more from you
- 8 replies
-
- elementdata
- events
-
(and 1 more)
Tagged with:
-
so when will this script be updated again?
-
I'm glad to see how far things got with this... Love the new functions. Keep up the good work @thisdp
-
what do you mean by "Can you program the Dx login panel?..." Do you mean with MTA DX or thisdps dx gui system?
-
function login_panel() local screenW, screenH = guiGetScreenSize() main_win = DGS:dgsDxCreateWindow((screenW - 616) / 2, (screenH - 402) / 2, 616, 402, "", false) DGS:dgsDxWindowSetSizable(main_win, false) userlb = DGS:dgsDxCreateLabel(6, 18, 145, 32, "USERNAME:", false, main_win) guiLabelSetHorizontalAlign(userlb, "center", false) guiLabelSetVerticalAlign(userlb, "center") passlb = DGS:dgsDxCreateLabel(6, 50, 145, 32, "PASSWORD", false, main_win) guiLabelSetHorizontalAlign(passlb, "center", false) guiLabelSetVerticalAlign(passlb, "center") usered = DGS:dgsDxCreateEdit(151, 18, 167, 32, "", false, main_win) passed = DGS:dgsDxCreateEdit(151, 50, 167, 32, "", false, main_win) statuslb = DGS:dgsDxCreateLabel(49, 96, 269, 99, "", false, main_win) loginbtn = DGS:dgsDxCreateButton(1, 336, 132, 40, "LOGIN", false, main_win) regbtn = DGS:dgsDxCreateButton(133, 336, 132, 40, "REGISTER", false, main_win) orlb = DGS:dgsDxCreateLabel(270, 344, 80, 32, "--OR LOGIN--", false, main_win) guiLabelSetHorizontalAlign(orlb, "center", false) guiLabelSetVerticalAlign(orlb, "center") ipbbtn = DGS:dgsDxCreateButton(380, 336, 200, 40, "WITH FORUM ACCOUNT", false, main_win) players_on = DGS:dgsDxCreateGridList(360, 17, 223, 188, false, main_win) update_notes = DGS:dgsDxCreateLabel(360, 97, 223, 155, "", false, main_win) DGS:dgsSetSize(statuslb, 6) showCursor(true) end -- Login GUI click events addEventHandler("onClientDgsDxMouseClick",root,function() if source == loginbtn then DGS:dgsDxGUISetText(statuslb, "Attempting to login... please wait") fadeCamera(false, 1) triggerServerEvent("attemptClientLogin", localPlayer, DGS:dgsDxGUIGetText(usered), DGS:dgsDxGUIGetText(passed)) -- On registration elseif source == ipbbtn then triggerServerEvent("onIPB", localPlayer, DGS:dgsDxGUIGetText(usered), DGS:dgsDxGUIGetText(passed)) elseif source == regbtn then local password = DGS:dgsDxGUIGetText(passed) local username = DGS:dgsDxGUIGetText(usered) if (#password == 0) then DGS:dgsDxGUISetText(statuslb, "Enter a Password") elseif (#password < 6 or #password > 30) then DGS:dgsDxGUISetText(statuslb, "Password Must be\n6-30 Characters Long") DGS:dgsDxGUISetProperty(statuslb,"#ff0000",tocolor(255, 0, 0)) elseif (string.find(password, "%s")) then DGS:dgsDxGUISetText(statuslb, "Your password cannot\n contain a space!") DGS:dgsDxGUISetProperty(statuslb,"#ff0000",tocolor(255, 0, 0)) elseif (password == username) then DGS:dgsDxGUISetText(statuslb,"Your username and \npassword must be different!") DGS:dgsDxGUISetProperty(statuslb,"#ffff00",tocolor(255, 255, 0)) else triggerServerEvent("onClientAttemptRegistration", localPlayer, DGS:dgsDxGUIGetText(usered), DGS:dgsDxGUIGetText(passed)) end end end) DGS:dgsDxGUISetText works fine but when I add DGS:dgsDxGUISetProperty it wont change the label color... any help with that?
-
ok cool, would like to see more on this resource it looks cool! would like to see radio button also...
-
could you add: guiLabelSetColor ( element theElement, int red, int green, int blue )
-
so its just like a normal gui? do I use dgsDxGUICloseWindow to close window if button is clicked?
-
but you could've just edit the meta
-
ah could you do this for MyBB?
-
addEventHandler("onPlayerLogout", root, function(account) setElementHealth(source, 100) setAccountData(account, "admin.level", getElementData(source, "admin.level") or 0) removeElementData(source, "admin.level") kickPlayer(source, "Rendszer", "Kijelentkeztél.") end ) ah you used getElementData
-
I think you should get the element data... getElementData(source, "admin.level") on player login