
Zentharus
Members-
Posts
25 -
Joined
-
Last visited
Zentharus's Achievements

Advanced Member (8/54)
0
Reputation
-
Not at all, and i wouldn't know how to do that, im not a very good scripter so yeah..
-
Well crystal, the reason i have it in this order, i have the addEventHandler commands added in that location because its directly under my code of where it creates the GUI, and the end part ends my entire script above.
-
Your post makes no sense, im not wanting them to register on webpage and only after can they register on the server, they register on webpage and only after they can LOGIN to the server. I also think your a really rude person, And how come you think i dont know lua? Maybe i don't, but you dont gotta be so rude about it The thing is though, i dont know what code and stuff i would use to connect it server sided to the website and I would have no idea where to start, could you possibly help me out?
-
Hello, so i have a login script here but what i wanna know is if someone could help me add mysql to it so i could register on website and login ingame function PlayerLogin(username,password,checksave) if not (username == "") then if not (password == "") then local account = getAccount ( username, password ) if ( account ~= false ) then logIn(source, account, password) triggerClientEvent (source,"hideLoginWindow",getRootElement()) if checksave == true then triggerClientEvent(source,"saveLoginToXML",getRootElement(),username,password) else triggerClientEvent(source,"resetSaveXML",getRootElement(),username,password) end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Login","Wrong username and/or password!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Login","Please enter your password!") end else triggerClientEvent(source,"set_warning_text",getRootElement(),"Login","Please enter your username!") end end addEvent("onRequestLogin",true) addEventHandler("onRequestLogin",getRootElement(),PlayerLogin)
-
You dont need the full code, the rest of it is just creating the GUI Therefore it isn't needed.
-
Alright, i got this stuff fixed up, yet i have a problem with my script, i have it showcursor and setinputenabled activated once script starts addEventHandler ( "onClientGUIClick", Lobby.button[1], hideBoxes, false) addEventHandler ( "onClientGUIClick", Lobby.button[2], hideBoxes2, false) end showCursor(true) guiSetInputEnabled(false) addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), createWindow ) function hideBoxes ( button, state ) if button == "left" and state == "up" then setElementDimension ( localPlayer, 0 ) guiSetEnabled(guiButtons, false) guiSetEnabled(guiButtons1, false) guiSetVisible(guiButtons, false) guiSetVisible(guiButtons1, false) showCursor(false) guiSetInputEnabled(true) end end function hideBoxes2 ( button, state ) if button == "left" and state == "up" then setElementDimension( localPlayer, 1 ) guiSetEnabled(guiButtons, false) guiSetEnabled(guiButtons1, false) guiSetVisible(guiButtons, false) guiSetVisible(guiButtons1, false) showCursor(false) guiSetInputEnabled(true) end end Yet, the cursor doesn't go away and it doesn't do guiSetInputEnabled(true) upon clicking a button, why is this?
-
Alright, i got this stuff fixed up, yet i have a problem with my script, i have it showcursor and setinputenabled activated once script starts addEventHandler ( "onClientGUIClick", Lobby.button[1], hideBoxes, false) addEventHandler ( "onClientGUIClick", Lobby.button[2], hideBoxes2, false) end showCursor(true) guiSetInputEnabled(false) addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), createWindow ) function hideBoxes ( button, state ) if button == "left" and state == "up" then setElementDimension ( localPlayer, 0 ) guiSetEnabled(guiButtons, false) guiSetEnabled(guiButtons1, false) guiSetVisible(guiButtons, false) guiSetVisible(guiButtons1, false) showCursor(false) guiSetInputEnabled(true) end end function hideBoxes2 ( button, state ) if button == "left" and state == "up" then setElementDimension( localPlayer, 1 ) guiSetEnabled(guiButtons, false) guiSetEnabled(guiButtons1, false) guiSetVisible(guiButtons, false) guiSetVisible(guiButtons1, false) showCursor(false) guiSetInputEnabled(true) end end Yet, the cursor doesn't go away and it doesn't do guiSetInputEnabled(true) Why is this?
-
alright, so i modified it, it now changes dimensions, but it has this problem now. WARNING: guitest\client.lua:36: Bad argument @ 'guiSetEnabled' [Expected gui-element at argument 1, got table] WARNING: guitest\client.lua:37 Bad argument @ 'guiSetVisible' [Expected gui-element at argument 1, got table] Where do i define guiButtons
-
That would be the problem as he said, because i didn't define it, i dont know how to do this exactly i tried multiple things, so how exactly would i do this?
-
First, can you explain to me where i would define GuiButtons, idk exactly how to do that, i would also like to know what i would possibly use in my script for getLocalPlayer, could you possibly show me the two lines to use for those?
-
Alright, so i gave it a try, the GUI's load fine no prolem, but when i click the GUI it says WARNING: guitest\client.lua:35: Bad argument @ 'setElementDimension' WARNING: guitest\client.lua:36: Bad argument @ 'guiSetEnabled' [Expected gui-element at argument 1, got table] WARNING: guitest\client.lua:37 Bad argument @ 'guiSetVisible' [Expected gui-element at argument 1, got table] Here is my code for the part of the script showing this error, and the table GuiButtons = { "Lobby.window[1]","Lobby.button[1]","Lobby.window[2]","Lobby.button[2]" } function hideBoxes ( button, state ) if button == "left" and state == "up" then setElementDimension ( player, 1 ) guiSetEnabled(GuiButtons, false) guiSetVisible(GuiButtons, false) end end As i am a noob scripter, i know i did this wrong and thats why im asking for help.
-
What would the part of the script be though, as i tried using onClientGUIClick already and it isn't working out for me, I want it so when you click one, that specific button does a specific thing and removes the other button and windows, but i dont know exactly how to do that. Edit: Ill give it a try, and post errors so you can see what i did wrong, im still beginner soo.
-
Hello, so i had just recently created this GUI using GuiEditor race_Panel = {} dd_Panel = {} showCursor(true) addEventHandler("onClientResourceStart", resourceRoot, function() race_Panel = guiCreateWindow(103, 192, 147, 159, "|| Race ||", false) guiWindowSetMovable(race_Panel, false) guiWindowSetSizable(race_Panel, false) race_Button = guiCreateButton(9, 25, 128, 124, "", false, race_Panel) guiSetAlpha(race_Button, 0.88) guiSetFont(race_Button, "clear-normal") guiSetProperty(race_Button, "NormalTextColour", "FFAAAAAA") dd_Panel = guiCreateWindow(288, 192, 147, 159, "|| Demolition Derby ||", false) guiWindowSetMovable(dd_Panel, false) guiWindowSetSizable(dd_Panel, false) dd_Button = guiCreateButton(10, 25, 128, 124, "", false, dd_Panel) guiSetAlpha(dd_Button, 0.88) guiSetFont(dd_Button, "clear-normal") guiSetProperty(dd_Button, "NormalTextColour", "FFAAAAAA") end ) But what im wondering is How would i make it so that once One of the buttons are clicked, Both are hidden, i know it would use something like this, but how would i make it so once they are clicked they are removed as i dont know how to guiSetVisible(race_button, dd_button, false) I would assume it would be a code like this, but how do i make it after it is clicked is what i dont know.
-
Awesome, thanks it works now with no warnings or errors