AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Data resets on mapchange. (https://forums.alliedmods.net/showthread.php?t=185217)

h0ppetau 05-14-2012 08:11

Data resets on mapchange.
 
1 Attachment(s)
Hi guys,

I'm running a plugin called MoneyMod by Funfel, and on mapchange it resets all players items and money.

I would like to use the best way to save this kind of data. I have a running MySQL server, but maybe this kind of data is best stored in files?


Is there anyone out there able to locate the problem, and do you know a better solution? I dont know very much about scripting, so all help would be appreciated.

Exolent[jNr] 05-14-2012 09:39

Re: Data resets on mapchange.
 
Attach the .sma file instead of posting the code.

h0ppetau 05-15-2012 03:58

Re: Data resets on mapchange.
 
Quote:

Originally Posted by Exolent[jNr] (Post 1708701)
Attach the .sma file instead of posting the code.

Sorry about that. I've fixed it now.



Anyways, if anyone encounters the same problem;

I fixed it by adding:

PHP Code:

new g_Vault;
new 
vaultkey[63], vaultdata[63]; 

public func_save:
PHP Code:

nvault_set(g_Vault,vaultkey,vaultdata); 

public func_load:
PHP Code:

nvault_get(g_Vault,vaultkey,vaultdata,63); 



All times are GMT -4. The time now is 00:19.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.