[Need help] Nvault -> MySql saving
I need help changing a plugin that uses nvault save to make it use mysql save.
I have no knowledge what so ever of how to code with mysql saving, so I need you you to make the code for me. If you need any more information from the plugin to be able to do this, please tell me. Here is the code for saving/loading. PHP Code:
|
Re: [Need help] Nvault -> MySql saving
This might help you: https://forums.alliedmods.net/showpo...12&postcount=4
|
Re: [Need help] Nvault -> MySql saving
try this (works with both sqlite and mysql, configuration in amxmodx/configs/sql.cfg):
PHP Code:
|
Re: [Need help] Nvault -> MySql saving
Quote:
In the configs/sql.cfg I've written all the nessesary information, at least I think so, otherwise I should have gotten a error, right? The plugin tracks my time perfectly, but if I reconnect or the server changes map my time is reset. |
Re: [Need help] Nvault -> MySql saving
I forgot to add +get_user_time(id) in save function. Code edited.
|
Re: [Need help] Nvault -> MySql saving
Quote:
Needed this because my server is too weak to handle all the vault files I have. After a point it makes the server bug and lag when it's saving/loading all the data for each and single player. Again, thank you so much! Merry christmas and happy new year! |
Re: [Need help] Nvault -> MySql saving
That's because you open and close nvault every time you save or load data. Open it in plugin_init and close in plugin_end to get rid of lags.
|
Re: [Need help] Nvault -> MySql saving
Quote:
By the way, I feel bad to ask you, but can you change another plugin I have to mysql saving? This one is really small, and I've tried using the way above, but I just fail and it bugs. Here are the saving/loading codes. PHP Code:
PHP Code:
|
| All times are GMT -4. The time now is 13:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.