DARIOcaptain

Login Panel in SQLite

Recommended Posts

Hello everyone,

I just started my adventure with scripting in MTA, I have some basic knowledge, but I have problems with finding some tutorials on the internet, so I have decided to start a new topic for my question. I already made SQLite database and now I want to create a basic login-panel GUI and connect it to database. Please keep in mind that I'm beginner. Thanks for help.

Share this post


Link to post
Posted (edited)

Hi!

You need to use dbConnect to connect databases. (both MySQL / SQLite)

For the GUI, you need:
guiCreateWindow - background window
guiCreateLabel - texts
guiCreateEdit - inputs
guiCreateButton - buttons

guiGetText - get input's text
onClientGUIClick - detect when client push to button (event)

triggerServerEvent - send datas to server side

 

You can use default login/register functions
addAccount - add new account (register)
getAccount - get the account from username and password
logIn - login player the the account

Or do your own account system, with database.

Edited by Patrick
  • Like 1

Share this post


Link to post

No I don't have account system, as I said I'm a beginner and I don't know to write it. I only have database, but there is nothing in it. Thanks for reply, I will try it.

Share this post


Link to post
6 minutes ago, DARIOcaptain said:

No I don't have account system, as I said I'm a beginner and I don't know to write it. I only have database, but there is nothing in it. Thanks for reply, I will try it.

Some tutorial:

https://www.youtube.com/watch?v=0S0k9ny3d4M (Check the whole channel)

https://forum.mtasa.com/topic/121619-Lua-for-absolute-beginners
https://forum.mtasa.com/topic/95654-tut-debugging/
https://forum.mtasa.com/topic/114541-tut-events/

  • Like 1

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.