Sorry all, I have been really busy recently but finally I am at a point where I can take a hour or so and update the code for GMod 13 correctly with create table abilities. Will edit this post as soon as I finish it. Will also be testing everything to make sure everything works because I shouldn't be screwing anyone over.
EDIT:Also, I was really stupid and made a custom function outside of this file called ulx.adduserids(). I am making a new custom function WITHIN THIS FILE so it will avoid displaying chat and still update. I am still reading through other peoples errors and fixing them as I fix this script up.
I think this has been approached wrong.
In my opinion, It would be much better if this didn't read the ranks from the external database, but rather synced the local data file with the remote database whenever a player's rank changes, or a player connects. This way, any connection problems can be overlooked quite easily, and cause minimal disruptions for the server in the event of a failed connection, as the remote database would simply become a backup, only with the added feature of being able to display a players rank in a loadingurl.
How one would go about doing this, is beyond me. I have ideas, I just can't make them.
Your welcome to whomever feels inspired by that.
There is an issue this. Simply the fact that this is used to sync across servers. If I read off a local file, on another server the database would get a new rank and that user wouldn't get the correct rank.
HOWERVER I need to hook into when a player is given a new rank to update whenever ranks change. This would work as a much more effective way of handling the rankings.
Found the hooks that I needed and should be able to use them correctly to go about this better.
UPDATEMost of the script is done. Once I figure out how I want to handle putting this on a server with already defined users, I will put up the new script.
Okay, I have decided that it will not accept users that were added before the MySQL was implemented. Sorry, but this is to avoid exploits that could be possible with other ways i thought of. I will upload the new GMod 13 version which I have tested. It will create a table and insert data as needed. It will also save the name in case you need it(loading screens or something?) If anyone has a better idea for avoiding exploits and loading predefined users, please shoot me a message. Other then that, happy servering.
To install MySQLOO, go here:
http://facepunch.com/showthread.php?t=1220537