Jump to content

Need Help at my Script!


gokalpfirat

Recommended Posts

Posted
handler = mysql_connect("localhost", "root", "ankara", "mtaturk") -- Establish the connection 
if ( not handler ) then -- The connection failed 
  outputDebugString("Unable to connect to the MySQL server") 
else 
  outputDebugString("Connected") 
end 
  
function kayit(player,cmd,name1,pass) 
name1 = tostring(name1) 
c1 = mysql_query(handler, "SELECT Name FROM users WHERE Name='"..name1.."'") 
if (c1 == true) then 
outputDebugString("Name already exist") 
else 
outputDebugString("You can create an acc") 
reg = mysql_query(handler, "INSERT INTO users(Name,Pass,Para,Puan) VALUES('"..name1.."', '"..pass.."', 0, 0 ") 
end 
mysql_free_result(c1) 
end 
addCommandHandler("kayit",kayit) 

This is my script I connect my mysql but when I "kayit" command I cant add accound.

mtaubluascripter.png
Posted

Are you sure "c1" is returning: true or false?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Oh, so the problem is that is not inserting the account?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...