Zentharus Posted July 6, 2013 Share Posted July 6, 2013 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) Link to comment
Memory Posted July 6, 2013 Share Posted July 6, 2013 Your code don't mean nothing. I think nobody didn't make it for free. It's hard job. And I understood that you don't know lua, so look for paid scripters or learn lua. Link to comment
denny199 Posted July 6, 2013 Share Posted July 6, 2013 Connect it on the server side with the mysql server of the website and then excecute everything with dbExec. Link to comment
bandi94 Posted July 6, 2013 Share Posted July 6, 2013 Why you would do such thing ? If you wanna that the player must be registred on your webpage and only after he can register on the server. Then why you don't ask them enter the forum name and after check if there is a usser with that name on the forum ? Link to comment
Zentharus Posted July 6, 2013 Author Share Posted July 6, 2013 Why you would do such thing ? If you wanna that the player must be registred on your webpage and only after he can register on the server. Then why you don't ask them enter the forum name and after check if there is a usser with that name on the forum ? 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. Your code don't mean nothing. I think nobody didn't make it for free. It's hard job. And I understood that you don't know lua, so look for paid scripters or learn lua. 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 Connect it on the server side with the mysql server of the website and then excecute everything with dbExec. 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? 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