Jump to content

Search the Community

Showing results for tags 'sqlite'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me





Found 16 results

  1. O que é? Pra que serve? Um banco de dados é onde ficam salvos diversos tipos de dados que são usados entre as sessões dos jogadores e do servidor, isto significa que mesmo se o jogador relogar no servidor ou até mesmo o servidor reiniciar, os dados salvos no banco de dados não são perdidos. (se o script que salvou lá foi feito corretamente). O que posso salvar neles? O MTA já cria 2 bancos de dados padrão quando vc cria seu servidor, são eles: internal.db - Onde são salvos todos os dados das contas dos jogadores, login, senha, grana do bolso, posição do jogador quando deslogou,
  2. So hi guys, I've been lately working on some scripts just for fun to get familiar with this concept of creating my own resources and now I would like to ask you if someone could explain to me how can I get data from a database and then compare that data with let's say something like account name of a player. Yes, I know I'm supposed to use dbQuerry and dbPoll but I just can't get it to work, so if you'd be so kind to show me in a simple example how to compare the two I'd be really grateful. So let's say the problem is how can I compare user account name and maybe a ownerName(of a house perhaps
  3. Olá pessoal, boa tarde! Faz tempo que tenho um conhecimento relativamente avançado em Lua e MTA Scripting, porém não sabia absolutamente NADA em relação á banco de dados SQLite. Há pouco tempo atrás aprendi sobre, porém preciso de ajuda com o seguinte problema: » Preciso salvar no banco de dados, a cada vez que um comando é efetuado, salvar +1 número na célula da coluna... Deu pra entender? Tipo assim: Carro Estoque Camaro 1 Quando eu efetuar o comando: Carro Estoque Camaro 1 +1 *eu preciso pegar o valor existen
  4. Opa, estou começando a mexer com sqlite e no momento estou tentando fazer um simples registro por comando... porém não consigo segue abaixo o codigo: local connect = dbConnect("sqlite", "registry.db") addEventHandler("onResourceStart", resourceRoot, function() local exec = executeSQLQuery("CREATE TABLE IF NOT EXISTS registroPessoal (ID INTEGER NOT NULL PRIMARY KEY, username TEXT, password TEXT, mtaserial INTEGER, PosX REAL, PosY REAL, PosZ REAL, accountName TEXT)" ) local query = dbQuery( connect, "SELECT * FROM registroPessoal") outputChatBox(tostring(query))
  5. Tell me, what is better: MySQL, SQLite or XML? (You need to save (and retrieve) many user settings)
  6. Olá pessoas deliciosamente bonitas! Bom, estou desenvolvendo um save-system por SQLite, porém, na parte de salvar as coordenadas do jogador, do contrário de salvar cada um dos tipos de coordenadas em uma coluna (X - Y - Z) eu queria salvar em uma única coluna (Coordenadas), mas como vocês devem saber, dados obtidos de um db são retornados como string, então utilizei Vector3 e tonumber, mas com o tonumber retorna um valor nulo, e sem ele retorna uma string, como eu poderia fazer para retornar o valor original de coordenadas? Código: local x2, y2, z2 = 675.99396,-1692.27075,8.70498
  7. So, i choose MTA over SAMP recently, to start learn scripting and developing my own server. Okay... I'm reading some scripts and by them, start browsing about the MTA's integrated systems that could help me develop an amazing or at least good experience, to my self and other players. The first thing that I've been facing is SQLite. I understood that it's a language of some kind to create a database, which could have: group names with their slots and store any change related with those; Items in market with fluctuating price; Car names, colors or price that are owned by the players; Inv
  8. so i have this code exports.scoreboard:addScoreboardColumn( 'time', root, 150 ) -- Online time is the element data local DB = dbConnect( "sqlite", "time.db" ) addEventHandler("onResourceStart", resourceRoot, function ( ... ) dbExec( DB, "CREATE TABLE IF NOT EXISTS online( playerACC, weeks,days, hours, minutes, secs )") for i, player in ipairs( getElementsByType("player") ) do local accountN = getAccountName( getPlayerAccount( player ) ) local getData = dbPoll( dbQuery( DB, "SELECT * FROM online WHERE playerACC=?", accountN), -1 ) if ( #get
  9. so i tried to make saving system that saves kills and deaths but it doesn't save full script local root = getRootElement() local scoresRoot = getResourceRootElement(getThisResource()) local scoreColumns = {"Kills", "Deaths", "ratio", "status"} local isColumnActive = {} local KDR_DECIMAL_PLACES = 2 --http://lua-users.org/wiki/SimpleRound local function round(num, idp) local mult = 10^(idp or 0) return math.floor(num * mult + 0.5) / mult end local function setScoreData (element, column, data) if isColumnActive[column] then setElementData(element, column, data) end end loc
  10. How can I change the MTA internal db (internal.db and registry.db) to MySQL, maintening the functions like getAccountData, getElementData ?
  11. Hello fellows how are you ? Today i want to use database connections Into a simple script that im gonna make about user settings The script is simple a gui opens up and the user selects if he wants to enable disable some graphical settings (car reflection, water, detail, contrast, show fps counter etc blah blah) Script is made and works perfect but i want to save each user settings to database(sqlite for now since i don't want to have remote control of database for now so mysql is not needed) so when he logs on to server the settings he set before will be applied, and also if hes n
  12. Hello guys, Yesterday I didn't have anything to do so I decided to convert MTA Paradise to SQLite, ( just the sql resource needs to be changed ). The resource has not all the capabilities of the original one like editing already existing columns, but the other features are working OK. Now you won't need any mySQL host or module http://www72.zippyshare.com/v/CeQ6O7FB/file.html
  13. When i try updating the database it does not work when using the WHERE clause... I get no errors. Here's all the code
  14. I have the following, which just gets "skin", "cash" and "wasWanted" from the DB function spawnOnLogin () playerName = getPlayerName(source) local findPlayer = dbQuery(db, "SELECT `skin`, `cash`, `wasWanted` FROM player_stuff WHERE name=?", playerName ) local dataresult = dbPoll ( findPlayer, -1 ) if dataresult[1] then local skin = dataresult["skin"] local cash = dataresult["cash"] local wasWanted = dataresult["wasWanted"] end end addEventHandler("onPlayerJoin", getRootElement(), spawnOnLogin) the variables "skin", "cash" and "wasWanted" all come back nil
  15. Estoy creando un sistema de guardado de cuentas en SQLite pero tengo problemas. Con el código a continuación, cuando le doy a registrar, siempre me dice que hay una cuenta ya creada (cuando la .db está vacía) y cuando le doy a loguear, con lo que sea, puedo entrar. addEventHandler( "onResourceStart", resourceRoot, function( ) sql = dbConnect ( "sqlite" , "accounts.db" ) -- Create the connection playersTable = dbQuery ( sql , "CREATE TABLE IF NOT EXISTS accounts (account TEXT,password TEXT,serial TEXT)" ) if fileExists( "accounts.db" ) and sql and playersTable then outputDebug
  • Create New...