My MySQL system doesn't work - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: My MySQL system doesn't work (
/showthread.php?tid=611909)
My MySQL system doesn't work -
CeSuX - 12.07.2016
So I tried to make MySQL System for my server using this tutorial:
https://sampforum.blast.hk/showthread.php?tid=574714
I tried and tried and nothing worked, everytime i join i get the login window, even tho i didn't even register, my stats doesn't save
for all of the MySQL Stuff I use XAMPP i think is called, the message "[MYSQL] has connected successfully" appears,
I am new with the MySQL, here is the code:
http://pastebin.com/qGTt1M1e
Everything compiles perfectly, I am using Sublime Text 3 to write the code.
Re: My MySQL system doesn't work -
TheHonnor - 12.07.2016
Hi!
1. I recommend you to use MySQL hashing. Because MySQL has SHA, MD and more.. Not really Whirlpool.
2. At OnPlayerConnect, you have to write a query which select you from the db. Example: "SELECT * FROM `Accounts` WHERE `Name` = '%s'".. And Name is your name.. from db. You must format the query first. And then use the mysql tquery. And you need to make a callback to check if you need to login or need to register.
I hope it helps.
Re: My MySQL system doesn't work -
CeSuX - 12.07.2016
Well... I already made if the player is registered or logged...
I will try your OnPlayerConnect stuff now...