-
Posts
642 -
Joined
-
Last visited
Everything posted by Lloyd Logan
-
It works! But, can you explain gsub
-
Thanks for the triggerClientEvent, i'll change that! But, the real problem was addEventHandler, when it should have bee addEvent! Oh my bad, I didn't see that error. Such simple things! Thanks again
-
Thanks for the triggerClientEvent, i'll change that! But, the real problem was addEventHandler, when it should have bee addEvent!
-
Why does this say there is no text in the editbox even if there is? function checkRegField() inputusernamereg = guiGetText(GUIEditor.edituserreg) inputpasswordreg = guiGetText(GUIEditor.editpassreg) if inputusernamereg or inputpasswordreg == "" then guiSetVisible (GUIEditor.window[2], true ) guiBringToFront ( GUIEditor.window[2] ) else triggerServerEvent("submitRegister", getRootElement(), inputusernamereg, inputpasswordreg) end end
-
Sorry, I should've been more specific, line 9 should be triggered to show, but line 2 should be triggered to hide!
-
Why isn't this closing the GUI? SERVER function submitReg() dbExec(server, "CREATE TABLE IF NOT EXISTS accounts (accountname TEXT, password TEXT)") new = dbExec(server, "INSERT INTO accounts VALUES (accountname, password)", inputusernamereg, inputpasswordreg) output = outputChatBox("You have successfully created an account!") if new == true then triggerClientEvent("closedok", getRootElement()) triggerClientEvent("onErrorok", getRootElement()) end end addEvent( "submitRegister", true ) addEventHandler( "submitRegister", root, submitReg ) CLIENT function onErrorOk() guiSetVisible (GUIEditor.window[2], false) end addEventHandler("onErrorok", true) addEventHandler("onErrorok", getRootElement(), onErrorOk) function closeSuccess() guiSetVisible (GUIEditor.window[3], true ) end addEventHandler("closedok", true) addEventHandler("closedok", getRootElement(), closeSuccess) Thanks
-
So there isn't a need for the variable 'server'?
-
You're right, how does this look? local user = "root" local pass = "" local host = "127.0.0.1" local db = "servermta" server = dbConnect ( "mysql", "dbname=servermta;host=127.0.0.1","root")
-
I tried adding an all privileged account, name = lloyd and pass = mtaserver, but still the same
-
Hi, why isn't this working, it's saying access denied for user local user = "root" local pass = "" local host = "127.0.0.1" local db = "accounts" server = dbConnect ( "mysql", "dbname=accounts;host=127.0.0.1") Thanks
-
Thanks for your time, I've have fixed it!
-
Hmm, It is not showing the GUI when the register button is pressed, any ideas?
-
Hey, So from my experience with Java, if a field is empty it equals to null . So, if I want to check if an edit box has no letters/words in it, how would i go about it? So far i got; function checkRegField() inputusername = guiGetText(editusername) if inputusername == "" then guiSetVisible (GUIEditor.window[2], not guiGetVisible ( GUIEditor.window[2] ) ) end end Thanks Lloyd
-
Nah, my Internet is fine.
-
Could you either, post your code here, or PM it to me!
-
You mean edit the .img or using the GUI creator?
-
Mad I may be, but I have a no complaints about it yet, so all is good for now!
-
Thank you very, Highly appreciate that Anytime!
-
dxDrawText If you are a scripter. or create it using this https://community.multitheftauto.com/index.php?p= ... ils&id=141 Thanks
-
Sounds good mate!
-
Yeah, he will have to getAccountData then setAccountData !
-
I will go now, but I didn't know that language had numbers in it? Not really, some words that WE have doesn't exist at the English/latin alphabet, so we use numbers instead. Aha, you learn something new everyday! Oh, better get out of this section! Before i am حذر
