Quote:
i want to turn it into mysql !
|
What i used to do way back (when mysql was still virtually impossible) was load my ini files, memorize them by storing the data in a multidimensional array in my script, and only update the ini files at set intervals and on player-leave or server-stop, this is exactly what you will need to do for your mysql.
0] Make array to store player data
1] Get player data from mysql db on player join
2] Store in player-data-array
3] Use player-data-array troughout your code as a source of player data
4] Update any player data in the array troughout your code
5] At set intervals (like every 5 minutes) save all the player-data from the array to the related mysql records
6] When a player leaves, save all the player-data from the array to the related mysql record
7] When you shut down server/gamemode, run step [5] once more to save everything again.
All in all, this is quite a big thing, way more then what i conciser "small enough to code as a reply to a question", so i would strongly suggest you start by looking at
this tutorial, or
this tutorial, then once you have a basic mysql based user profile system, come back here if you want more explenation about the player-data-array (both tutorials have such an array btw, they just dont go into a whole lot of detail on when you should be saving back to mysql db)