01.01.2019, 11:33
1. Yes, you could save all the player data in a single table but it would make it bulky and it'd take you long to browse your table. You better have different tables for different datas such as player weapons, player vehicles and all. You could link them all with the player name or the player ID (foreign key - which is better) and fetch them all once player log in. The ID should be on the main table where essential data of the player is stored.
2. Yes, you could save them OnPlayerDisconnect but I personally prefer saving players' data at an interval time (every 5 minutes). Server might not get the data such as "GetPlayer_" when the player disconnects.
3. Yes, you could have a separate table for that, even though there will be like only 1 row. I do that myself and it is much better than having a file (INI). So, when the server starts, check if the table is created and if it is not, create it and automatically add a row with the values that you would want ; for example, server weather having the ID 3.
- AjaxM.
2. Yes, you could save them OnPlayerDisconnect but I personally prefer saving players' data at an interval time (every 5 minutes). Server might not get the data such as "GetPlayer_" when the player disconnects.
3. Yes, you could have a separate table for that, even though there will be like only 1 row. I do that myself and it is much better than having a file (INI). So, when the server starts, check if the table is created and if it is not, create it and automatically add a row with the values that you would want ; for example, server weather having the ID 3.
- AjaxM.

