Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 24/10/20 in all areas

  1. If there is no cursor visible by script (chat cursor doesn't count), then the function getCursorPosition returns nil.
    1 point
  2. You're getting this error because you've missed a bracket on the end of the db string: CREATE TABLE IF NOT EXISTS `vehicles` (id INT, model INT, x FLOAT, y FLOAT, z FLOAT)
    1 point
  3. Dear iwalidza, do you have a MySQL server set-up already? It can be placed either locally (recommended) or remotely, on another computer. You need to register a user with a secure password as well as a database for use with your resource. And how much experience do you have with MySQL databases in general? You should use the official MTA database functions to connect to your configured MySQL server, in particular... dbConnect - call it once at start of resource to initialize a database connection handle (you need a host, username and password, etc) dbExec - creating new accounts into the MySQL database dbQuery with dbPoll and dbFree - taking account information out of your database In order to implement "This name already exists" you need to query the accounts SQL table on the "username" column and see if any row with that username already exists, for example... SELECT * FROM accounts WHERE username="iwalidza" If you were to use dbQuery on this statement in combination with dbPoll/dbFree you could check the existance of accounts prior to creating a double account. I found an accounts system that claims to use MySQL under-the-hood in the MTA resources community: https://community.multitheftauto.com/index.php?p=resources&s=details&id=7263 Please take a look at it and compare it with what you want to implement.
    1 point
×
×
  • Create New...