Jump to content

Asokanta

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by Asokanta

  1. Lua ile ilgili her desteği ücretsiz olarak verebilirim. Piyasaya kopyala - yapıştır yöntemi veya editlenip sunulmuş eklentilerden çok Türkler tarafından kodlanmış eklentilerin bulunmasını istiyorum. Aklınıza takılan en ufak sorunda benimle iletişime geçebilir veya forumda konu açarsanız yardım etmekten memnun olurum. Bunun dışında 0'dan başlamak isteyen veya halihazırda birşeyler bilenler kendi kodladığım sunucuya yardım etmek ve geliştirmek isteyenler benimle iletişime geçebilir. Discord : Asokanta#9451
  2. i tried but allways its giving outputChatBox("#afafaf[#f9a52fSA:MP#afafaf] #f9a52fVeritabanina bir veri eklenmedi.",root, 255, 255, 255, true ) The first code not after this code
  3. I created new topic for more details look here
  4. 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 :
  5. when i try command it inserting all the time Console log : mysql/serverside.lua:22: Bad argument @ 'dbPoll' [Expected dbquery at argument 1, got boolean] (in your code 22 is 8 )
  6. It means point but point need to be empty
  7. Yes,because i can't solve this problem Can anybody help me to solve this problem ?
  8. I tested the script but there is a problem: When i login its adding data to database all the time its bypassing the code and just insert data allways...
  9. Dude,i think you saved my life. I will try this code when i go online.
  10. 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.
  11. dude i have a database with datas i used print into them and i need check "username" and "password" md5 or sha256 isn't important now for me
  12. I know :Oing md5 and others i said i need check data using username and password i'm not talking about security help or don't help.now,get out of my post if any person can hack my server i give passwords and usernames directly
  13. function sqlGiris ( player,command ,arg1 , arg2 , oyuncu) local command = "girisyap" local username = arg1 local password = arg2 if( command ) and (arg1 ~= "" and arg1 ~= nil and arg2 ~= "" and arg2 ~= nil) then local sorgu = dbQuery( userdata_db, "SELECT * FROM `database` WHERE `USERNAME`=? AND `PASSWORD`=? LIMIT 1",username,password ) local result = dbPoll ( sorgu, -1 ) if result and #result >= 1 then outputDebugString("Giris Basarili.")--Login Confirmed. else outputDebugString("Giris Basarisiz.")--Login Error. end end end addCommandHandler("girisyap",sqlGiris) when i try command with arguments it says always login confirmed
  14. it not worked i want check data if data exists in table it says login confirmed but if data isn't exist in table it need say login error. it saying login confirmed when i use command with arguments like username and password.
  15. 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)
×
×
  • Create New...