Search the Community

Showing results for tags 'mysql'.

More search options

  • 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
    • Open Source Contributors
    • Suggestions
  • General MTA
    • News
    • Media
    • Site/Forum/IRC/Mantis/Wiki related
    • MTA Chat
    • Other languages
    • Scripting
    • Maps
    • Resources
    • Other Creations
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash
  • Private Bugtracker

Found 30 results

  1. dbConnection in use warning?

    So, friend of mine got this error: Picture He was like: dbConnection was in use, this is why it happened, but i was like: thats impossible, so this is why i ask you guys. btw: This is just a question, and i dont need a script-fix for is, just an answer about it.Thx in advance.
  2. Hello, I've downloaded Paradise Roleplay server, and it works, kind of, the server instantly quits because the MySQL module is missing, but it exists under the /mods/deathmatch/modules directory, please help
  3. [HELP]with MySql

    Hello i have problem with mysql it always says Unable to connect with database. Please contact Developer. well my website works well with the same mysql database it shows many tables but mta something isn't right local connection = nil addEventHandler("onResourceStart",resourceRoot,function(resource) connection = dbConnect("mysql","dbname=s397;;port=36517;","s397","j1BUEwHKZ") if connection then outputDebugString(getResourceName(resource) .. " : connected to database.") return true else outputDebugString(getResourceName(resource) .. " : Unable to connect with database. Please contact Developer.") return false end end ) i tried many things changing password going to forums or mta wiki and i couldn't find anything everything would make same thing
  4. Hello, I have spent a couple days learning the ins and outs of installing MySQL, I can tell you where to get the needed files, how to avoid errors, how to set it all up and basically get you started, I do NOT know how to create a database right now, but watched a tutorial or two and it seems easy, if you need links/help then either leave a comment or message me. I am here to help! --I have posted this here as MySQL is a great resource for creating databases and is easy to set up once you know how to do it.--
  5. Hello everyone! I am beginner in all of this. I am a hobby scripter, because I have interest in scripting. BUT I have problem. I want to make a skill system(like you shoot a leg you get 1points for that), and I found a free resource that varies your skill up to 999 in server side and I found another one that do this client side.(also I won't use it like my scripts in a server) OK I have problems with client AND server side too. I can't connect and update the variable. I created a table for the UZI skill (uzi_skill) to try it, but I can't get working. Original source: This is just the Uzi skill section. The skill is tied to the character-system. (db: character-system -> table: uzi_skill [tinyint(4)] ) function uzi ( attacker, attackerweapon, bodypart, loss ) local statz = getPedStat(attacker, 75) local healthh = getElementHealth(source) local setstat = statz + (100.0 - healthh) * 0.05 local cteam = getPlayerTeam(attacker) local pteam = getPlayerTeam(source) --exports['skill']:changeProtectedElementDataEx(source, "uzi_skill", tonumber(setstat)) <--- I tried with this. Complete FAIL(I know why) if getTeamName(cteam) == getTeamName(pteam) then return false elseif attacker and getElementType(attacker) == "player" and (attackerweapon == 28 or attackerweapon == 32) and (statz < 999) then setPedStat(attacker, 75, setstat) end if (statz > 980) then setPedStat(attacker, 75, 999) end end addEventHandler("onPlayerDamage", getRootElement(), uzi) I want a bit help, just one example how to do this with this. (Please don't ask in fragments. Also I don't know where to put that script fragment). I'd be happy if someone could help me
  6. [BUG] What's wrong with this query

    Hey guys, I get the following error: "payphone\main.lua:23: dbPoll failed; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version and for the right syntax to use near 'WHERE Number = 906366 at line 1" This is the code: local checkNr = dbQuery(handler, "SELECT * FROM PayPhoneOW LIMIT 1 WHERE Number = ".. phonenumber) local result, num_affected_rows, last_insert_id = dbPoll ( checkNr, -1 ) outputChatBox(tostring(num_affected_rows)) Fixed... LIMIT 1 was infront of WHERE... sorry....
  7. Multi MySQL command

    Hello! If i remember right i could send more then one sql command. Am i remember right? Can i do it now too? Because as far as i remember i had to set an option in dbQuery and now there is now such an option.
  8. 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 new user server will make a new list in database for that user with default settings (1(enable) for each setting)) anyway i don't need you to tell me how exaclty im gonna code that cause you will get through much work but i want to give me the idea how the hell am i gonna do this because the wiki is helpless in these things if you want some example how bad i am in scripting sql see below: playerSettings = {} function playerJoin() local settingsQuery = dbQuerry(connectionDb,"select * from settings") local settingsQueryResult = dbPoll(settingsQuery, -1) for i, user in pairs(settingsQueryResult) do local playerName = getAccountName(source) table.insert(playerSettings,playerName) end end addEventHandler("onPlayerJoin", resourceRoot, playerJoin) thanks in advance
  9. السلام عليكم ورحمة الله وبركاته شباب الحين ابي اعرف طريقة الاتصال بmysql عبر برنامج الفيجوال بيسيك مع العلم اني حملت المكتبه الخاصه بها ويجيلي ايرور
  10. when i try this code it's never insert datas into database pls help me... ) -- root = getElementRoot() addEventHandler("onPlayerLogin", root, function(_, account) outputChatBox(getPlayerName(source).." Giriş yapti.", root) local oyuncu = getPlayerName(source) local ip = getPlayerIP(source) local serial = getPlayerSerial(source) local username = getAccountName(account) local result = dbPoll( dbQuery( userdata_db, "SELECT * FROM masterdata WHERE username = ?", username ), -1 ) if type(result) ~= 0 then outputChatBox("#afafaf[#f9a52fSA:MP#afafaf] #f9a52fVeritabanina bir veri eklenmedi.",root, 255, 255, 255, true ) else dbQuery( userdata_db, "INSERT INTO masterdata VALUES (?,?,?,?,?)",username,serial,ip, '',oyuncu) end end) Console Log : Username = Asokanta WARNING: mysql/serverside.lua:22: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got nil] WARNING: mysql/serverside.lua:22: Bad argument @ 'dbPoll' [Expected dbquery at argument 1, got boolean] Username = deneme WARNING: mysql/serverside.lua:22: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got nil] WARNING: mysql/serverside.lua:22: Bad argument @ 'dbPoll' [Expected dbquery at argument 1, got boolean] I Fixed Here* It's giving only login logs but it still don't insert data in database when result isn't 0 New Console Log : LOGIN: (Everyone, Console) Asokanta successfully logged in as 'Asokanta' LOGIN: (Everyone) Asokanta successfully logged in as 'deneme' Database Screenshot :
  11. addEventHandler("onPlayerLogin", root, function() outputChatBox(getPlayerName(source).." Giriş yapti.", root) local oyuncu = getPlayerName(source) local ip = getPlayerIP(source) local serial = getPlayerSerial(source) local account = getPlayerAccount(source) local username = getAccountName(account) local qh = dbQuery( usedata_db, "SELECT * FROM masterdata WHERE username =?",username ) local result = dbPoll( qh, -1 ) if result == nil then local sorgu = dbQuery( userdata_db, "INSERT INTO `masterdata`(`username`, `serial`, `ip` ,`puan` , `name`) VALUES (?,?,?,'',?)",username,serial,ip,oyuncu) dbFree( sorgu ) else outputChatBox("#afafaf[#f9a52fSA:MP#afafaf] #f9a52fVeritabanina bir veri eklenmedi.",getRootElement(), 255, 255, 255, true ) end end) in here,i'm saying this : if this username don't exist in database insert data else do nothing. But when i try the script it gives nothing everytime like exist or don't exist usernames help pls.
  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
  13. Hello guys,i'm making own login-register system using MySQL but i when i can't check username and password ; local sorgu = dbQuery( userdata_db, "SELECT * FROM `database` WHERE `USERNAME`=? AND `PASSWORD`=?",username,password ) local result = dbPoll ( sorgu, -1 ) if result == 1 then I'm using this code for select data it but i can't get result for check (there is no console logs it's failing when i try the command)
  14. - Calidad, Seguridad & Economia en tus Servidores Quienes somos? es una Empresa dedicada exclusivamente al alojamiento de servidores SA:MP, MTA, CS:GS, Minecraft y VPS Linux/Windows Contamos con personal experto, soporte tecnico amigable disponible la mayor parte del dia Proteccion DDoS, 99.9% de tiempo en linea garantizado, Panel de control profesional propio Ofrecemos un exelente servicio a un precio economico, puedes comprar los slots que necesites cada slot a tan solo 8 centavos Algunos de Nuestros Beneficios Proteccion DDoS Juega sin interrupciones con la mejor proteccion DDoS, así tu servidor estara protegido contra envidiosos Espacio ilimitado No te preocupes por el tamaño de tus archivos, te brindamos espacio ilimitado en cualquier plan de Game Hosting Activacion instantanea No esperes para tener tu servidor activado, pides y en segundos tienes los datos necesarios para montar tu servidor y no te cobramos gastos de instalacion Backups Gratis Los Problemas pueden pasar en cualquier rato, ProSystemsHz esta preparado para cualquier problema con su archivos respaldados con Amazon. Soporte tecnico Si tienes problemas con tu servidor te ayudaremos con gusto, somo expertos y nos apaciona lo que hacemos, puedes contactarnos via sms/email/tickets Servidores Potentes Contamos con servidores capacitados y potentes para ofrecerte un buen servicio al cliente y dar una experiencia muy buena METODOS DE PAGO: Mensajes de texto (SMS), PayPal, Western Union, Y muy Pronto MercadoPago. Pagina web: Pagina en facebook: Email: Tambien ofrecemos chat en vivo desde la pagina web
  15. SaveAccount

    Hallo, please help me!
  16. Hi clients, ProSystemsHz comes with a big surprise, starting today we already have databases with phpmyadmin for your servers, if you want to database you just have to contact us through our customer area in the section "support". This also brings a downside, today prices rise from 7 cents per slot to 10 cents per slot, so do continue to maintain and offer them better quality in their services. ProSystemsHz, Your hosting solution.
  17. Alright, I've got the following JSON saved in my mysql: [ [ { "lastPlayed": 0, "experience": 0, "money": 20 }, { "lastPlayed": 0, "experience": 0, "money": 20 }, { "lastPlayed": 0, "experience": 0, "money": 20 }, { "lastPlayed": 0, "experience": 0, "money": 20 }, { "lastPlayed": 0, "experience": 0, "money": 20 }, { "lastPlayed": 0, "experience": 0, "money": 20 } ], [ { "lastPlayed": 0, "experience": 0, "money": 20 }, { "lastPlayed": 0, "experience": 0, "money": 20 }, { "lastPlayed": 0, "experience": 0, "money": 20 }, { "lastPlayed": 0, "experience": 0, "money": 20 }, { "lastPlayed": 0, "experience": 0, "money": 20 }, { "lastPlayed": 0, "experience": 0, "money": 20 } ] , [ { "lastPlayed": 0, "experience": 0, "money": 20 }, { "lastPlayed": 0, "experience": 0, "money": 20 }, { "lastPlayed": 0, "experience": 0, "money": 20 }, { "lastPlayed": 0, "experience": 0, "money": 20 }, { "lastPlayed": 0, "experience": 0, "money": 20 }, { "lastPlayed": 0, "experience": 0, "money": 20 } ] ] It are 6 elements inside 3 elements. Each of these 3 elements holds 6x the { "lastPlayed": 0, "experience": 0, "money": 20 }. Whenever I'm using fromJSON, it's returning the wrong information when I'm trying to access the first element out of the second collection. The code I'm using is as following: local saveData = fromJSON ( data [ 1 ].saves ); outputChatBox ( #saveData ); -- returns 6 elements (incorrect) outputChatBox ( #saveData [ 2 ] ); -- returns 3 properties (correct) outputChatBox ( tostring ( saveData [ 2 ] [ 1 ] ) ); -- returns nil The JSON is valid, I can use it in different languages too and every parser says it's correct. I'm starting to think that fromJSON is returning just the first collection instead of all 3. Has anyone encountered this problem? I'm not really a fan of putting it all into 1 collection, it's preventing me from adding more and more data later on.
  18. День добрый,столкнулся с такой проблемкой: Выполняю запрос на получение данных из БД function authUserDB(userName, userPassword, thePlayer) dbExec( bd,"SELECT `password` FROM Players WHERE nick='??'",userName) local Players = dbPoll(dbQuery(bd, "SELECT * FROM `Players`"), -1) for Index, PlayerData in ipairs(Players) do if userName == userName and userPassword == PlayerData.password then if (client) then spawnPlayer(client, 1721.7834, -1927.0063, 13.5672) setPlayerSkin(client,0) fadeCamera(client, true) setCameraTarget(client, client) triggerClientEvent(getRootElement(),"hideLogin",client) dbExec( bd,"SELECT `id` FROM Players WHERE nick='??'",client) local Players = dbPoll(dbQuery(bd, "SELECT * FROM `Players`"), -1) for Index, PlayerData in ipairs(Players) do setElementData ( source, "ID", ) outputChatBox("С возвращением на на ****** RP, "..userName.."! Ваш ID "".", client) end end else outputChatBox("Неправильные логин и пароль. Пожалуйста, переподсоединитесь и попробуйте еще раз.",client) end end end addEvent("submitLogin",true) addEventHandler("submitLogin",root,authUserDB) Дело в том,что ответ приходит несколько раз,и количество повторов зависит от количества записей в БД. Подскажите пожалуйста где я накосячил)
  19. Storing toptimes in database

    Hey everyone, I'm wondering about the best way to store toptimes in a database. The toptimes resource that comes with MTA creates a new table for each map, containing the toptimes. This seems to be an easy solution but it doesnt feel right to dynamically create a table like that. Does anyone have a alternative design how to do it? My concern is that looking up toptimes might take too long when they are all stored in one table. I have about 8000 maps. When each has 100 toptimes average at some point, you end up with 800.000 entries. Bonsai
  20. Привет всем, создал сервер на хостинге, загрузил мод RP, и когда я захожу на сервер у меня черный экран. А когда я создал сервер на компе все прекрасно работало, черного экрана не было. На компе у меня для Windows, Linux на хостинге. Буду очень благодарен за помощь) Конфиг
  21. Hola, no sé si ésto irá acá pero lo pondré puesto a que no encontré otra sección para el mismo. Bueno, les cuento. Recién me enteré del Paradise R.P. por lo que traté hacerlo (ya que era con MySQL). Lo descargué, configuré y empezó todo bien pero el problema estuvo al momento de entrar ya que se quedó todo en negro y me banneó automáticamente por supuesto hack (cuyo mismo no tengo) de gravedad. Estuve leyendo y encontré que a un usuario de ésta misma comunidad le pasó una cosa parecida cuya misma solventó entrando a su base de datos, yendo a la tabla "wcf1_user", buscando su usuario y poniendo ceros. Entonces yo traté de solventarlo de la misma forma pero, para mi sorpresa, no está la dichosa tabla "wcf1_user". No sé qué hacer ya que es ban de serial y no me puedo desbannear. Ayuda, por favor. Así es como me aparece: No sé si les servirá de algo o no, pero éste es el link del post del usuario que tuvo el problema similar: Saludos y gracias de antemano.
  22. Database connection errors

    Hey there, I'm working on a roleplay project to update some older scripts, however, I can not get the mysql to work. The mysql resource is connect to the database, but doesn't work with it. It gives no error messages besides this one, when trying to login: *ERROR: account-system/s_login.lua:44: attempt to concatenate local 's afepassword' (a nil value)* The resources has worked before with the database, just to confirm that. I'm running a 32bit linux server with the modules from
  23. Login System Some Images of GUI: Features: Uses External MySQL Database for register/login Logs in user to MTA System if account exist. It is opensource Installation: Configure your database configurations in server.lua Export database.sql to your selected database. Add this resource to your ACL's admin group and boom! Finished! You can start the script and connect to the server! Download Links MTA Community Resource: Exports: -- To Be Updated.. exports.login:getPlayerUsername(player) -- Gets Player Username.
  24. Доброго времени суток! Столкнулся с такой проблемкой: Нужно получить id игрока из базы данных. Отсылаю такой запрос: dbExec( bd,"SELECT `id` FROM Players WHERE nick='??'",PlayerName) Подскажите пожалуйста как вытащить полученный id.
  25. login Panel

    i change all my login data but the debug says i dont add ther serverside event to server side cant trigger there is my img : my server side : local mysql = exports.mysql addEvent("logIn", true) function logThePlayer(thePlayer,username,password) if thePlayer and username and password then if getElementType(thePlayer) == "player" then local account = mysql:db_Query("SELECT FROM users WHERE username'" .. username .."'") for i, sor in ipairs(account) do is sor["password"] == password then mysql:db_Exec("UPDATE users SET serial='" .. getPlayerSerial(thePlayer) .. "' WHERE username='" .. username .. "'") mysql:db_Exec("UPDATE users SET ip='" .. getPlayerIP(thePlayer) .. "' WHERE username='" .. username .. "'") local character = mysql:db_Query("SELECT * FROM characters WHERE accountname ='" .. username .. "'") if character then outputDebugString("Sikeressen talaltam charactert") for i, sor in ipairs(character) do setElementData(thePlayer, "acc:username", username) setPlayerMoney(thePlayer, sor["money"]) spawnPlayer(thePlayer,sor["posX"], sor["posY"],sor["posZ"], sor["pRot"], sor["pSkin"], sor["pInt"], sor["pDim"])) setPlayerName(thePlayer, sor["charactername"]) setCameraTarget(thePlayer, thePlayer) triggerClientEvent(thePlayer, "showHide", getRootElement()) outputChatBox("elvileg jo :D") end end else -- triggerClientEvent(thePlayer, "charactervalaszto", getRootElement()) triggerClientEvent(thePlayer, "showHide", getRootElement()) end end end end end end addEventHandler("logIn", getRootElement(), logThePlayer) my client side: fadeCamera(true) setCameraMatrix( 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) GUIEditor = { tab = {}, tabpanel = {}, edit = {}, button = {}, window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(411, 200, 438, 337, "Login Panel by Martin", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.tabpanel[1] = guiCreateTabPanel(14, 62, 404, 258, false, GUIEditor.window[1])[1] = guiCreateTab("Login", GUIEditor.tabpanel[1]) GUIEditor.edit[1] = guiCreateEdit(122, 49, 194, 40, "", false,[1]) GUIEditor.edit[2] = guiCreateEdit(122, 123, 194, 40, "", false,[1]) GUIEditor.button[1] = guiCreateButton(122, 170, 194, 40, "Login", false,[1])[2] = guiCreateTab("Register", GUIEditor.tabpanel[1]) GUIEditor.edit[3] = guiCreateEdit(122, 49, 194, 40, "x", false,[2]) GUIEditor.edit[4] = guiCreateEdit(122, 123, 194, 40, "y", false,[2]) GUIEditor.button[2] = guiCreateButton(122, 170, 194, 40, "Register", false,[2] ) end ) addEvent("showHide",true) function showHide() if guiGetVisible(GUIEditor.window[1]) == true then guiSetVisible(GUIEditor.window[1],false) showCursor(false) elseif guiGetVisible(GUIEditor.window[1]) == false then guiSetVisible(GUIEditor.window[1],true) showCursor(true) end end addEventHandler("showHide", getLocalPlayer(),showHide) showHide() function buttonClick() if source == GUIEditor.button[2] then local username = guiGetText(GUIEditor.edit[3]) local password = guiGetText(GUIEditor.edit[4]) triggerServerEvent("registerRequest",getLocalPlayer(),getLocalPlayer(),username,password) elseif source == GUIEditor.button[1] then local username = guiGetText(GUIEditor.edit[1]) local password = guiGetText(GUIEditor.edit[2]) triggerServerEvent("logIn",getLocalPlayer(),getLocalPlayer(),username,password) end end addEventHandler("onClientGUIClick",root,buttonClick)