Jump to content

Search the Community

Showing results for tags 'mysql'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

  1. Привет всем, создал сервер на хостинге, загрузил мод RP, и когда я захожу на сервер у меня черный экран. А когда я создал сервер на компе все прекрасно работало, черного экрана не было. На компе у меня для Windows, Linux на хостинге. Буду очень благодарен за помощь) Конфиг
  2. 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.
  3. 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 https://linux.multitheftauto.com/
  4. Доброго времени суток! Столкнулся с такой проблемкой: Нужно получить id игрока из базы данных. Отсылаю такой запрос: dbExec( bd,"SELECT `id` FROM Players WHERE nick='??'",PlayerName) Подскажите пожалуйста как вытащить полученный id.
  5. 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]) GUIEditor.tab[1] = guiCreateTab("Login", GUIEditor.tabpanel[1]) GUIEditor.edit[1] = guiCreateEdit(122, 49, 194, 40, "", false, GUIEditor.tab[1]) GUIEditor.edit[2] = guiCreateEdit(122, 123, 194, 40, "", false, GUIEditor.tab[1]) GUIEditor.button[1] = guiCreateButton(122, 170, 194, 40, "Login", false,GUIEditor.tab[1]) GUIEditor.tab[2] = guiCreateTab("Register", GUIEditor.tabpanel[1]) GUIEditor.edit[3] = guiCreateEdit(122, 49, 194, 40, "x", false, GUIEditor.tab[2]) GUIEditor.edit[4] = guiCreateEdit(122, 123, 194, 40, "y", false, GUIEditor.tab[2]) GUIEditor.button[2] = guiCreateButton(122, 170, 194, 40, "Register", false, GUIEditor.tab[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)
  6. i try to create a mysql login panel but the debug is says this : there is my client file: 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]) GUIEditor.tab[1] = guiCreateTab("Login", GUIEditor.tabpanel[1]) GUIEditor.edit[1] = guiCreateEdit(122, 49, 194, 40, "", false, GUIEditor.tab[1]) GUIEditor.edit[2] = guiCreateEdit(122, 123, 194, 40, "", false, GUIEditor.tab[1]) GUIEditor.button[1] = guiCreateButton(122, 170, 194, 40, "Login", false,GUIEditor.tab[1]) GUIEditor.tab[2] = guiCreateTab("Register", GUIEditor.tabpanel[1]) GUIEditor.edit[3] = guiCreateEdit(122, 49, 194, 40, "x", false, GUIEditor.tab[2]) GUIEditor.edit[4] = guiCreateEdit(122, 123, 194, 40, "y", false, GUIEditor.tab[2]) GUIEditor.button[2] = guiCreateButton(122, 170, 194, 40, "Register", false, GUIEditor.tab[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("loginReguest",getLocalPlayer(),getLocalPlayer(),username,password) end end addEventHandler("onClientGUIClick",GUIEditor.window[1],buttonClick) and this is my server file : addEvent("registerRequest",true) function registerRequest (player,username,password,email) local account = getAccount(username) if account == false then local ip = getPlayerIP(player) local serial = getPlayerSerial(player) exports.mysql:_Exec("insert into users(username,password,email,ip,serial) values (?,?,?,?,?)",username,password,email,ip,serial) local addAccount = addAccount(tostring(username),tostring(password)) if addAccount then outputDebugString("User register with username ".. username) else outputDebugString("ERROR Occur while register.") end end end addEventHandler("registerRequest",getRootElement(), registerRequest) addEvent("loginReguest",true) function loginReguest(player,username,password) local check = exports.mysql:_QuerySingle("SELECT * FROM users WHERE username = ? " ,username) if check then local checkPass = check.password if (checkPass == password) then logIn(player,tostring(username),tostring(password)) triggerClientEvent(player,"showHide", getRootElement()) outputDebugString("User Logged In") end end end addEventHandler("loginReguest",getRootElement(), loginReguest)
  7. I've been searching for a MySQL tips and noticed there is no such topics on this forum. So let's fix this little problem. I want to know more about optimising MySQL queries and how to interract with MySQL correctly, I am newbie in that. I learned that putting queries in the loop it's too performance-expensive, wrong, and very big chance it'll freeze your server for uncertain time. So if I want to get information from DB for a many players, better to make it using only 1 query. Example: "SELECT * FROM race_stats WHERE playerID IN(??)" Where "??" = table with logged in players. But, what if I want to update information for a many players at the same time? How such query should look like? For 1 player it looks like this: "UPDATE race_stats SET id1 = id1 + ?, id2 = id2 + ?, id3 = id3 + ?, id4 = id4 + ?, id5 = id5 + ? WHERE playerID = ?" But how to make the same for all players? Put query in the loop will be too performance-expensive I guess and will create laggs. P.S. Maybe for such thing as player stats better to learn MySQL procuderes and create procedure for this, I am newbie, just asking. Don't even know what is procedures exactly, just heard about it.
  8. Hello guys. Recently i heard this thing that it's better if i use fetchRemote for saving data. So, if the client have to save something to the mysql database instead of trigger it to the server then it saves it with dbQuery/dbExec (then trigger back if it's a SELECT) it's better to use fetchRemote on the client and call a php script. (mta, php, mysql server are on the same host) What do you think about it?
  9. Sticmy

    Ayuda D:

    Hola quisiera saber porque me causa este error D: Imagen:http://subefotos.com/ver/?f7951b2b2ec8a71ab3991c5570b6ee06o.png Codígo: function Insertar (source, ide, cost, x, y, z, r, r1, g1, b1, r2, g2, b2) local account = getPlayerAccount(source) local id = math.random (0,999999999) local check = executeSQLQuery("SELECT * FROM Vehiculos where Numero = '" .. id .. "'") if not ( type( check ) == "table" and #check == 0 ) or not check then InsertarData (source, ide, cost, x, y, z, r, r1, g1, b1, r2, g2, b2) else executeSQLInsert ( "Vehiculos", "'0','"..id.."','"..getAccountName(account).."','"..ide.."','"..cost.."','0','1000','"..x.."','"..y.."','"..z.."','"..r.."','"..r1.."','"..g1.."','"..b1.."','"..r2.."','"..g2.."','"..b2.."','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'" ) setElementID (getElementData(source, "hisCar"), tostring(id)) triggerClientEvent (source, "onBuyGuiSetText", source, getVehicleNameFromModel(ide), tostring(id)) end end
  10. WARNING: sql/mysql.lua:47: Access denied @ 'shutdown' Start up of resource sql cancelled by script Stopping sql start: Resource 'sql' start was requested (Start up of resource cancelled by script) I have a few issues with my sql and mysql linking to my database, would appreciate any help
×
×
  • Create New...