Raised This Month: $ Target: $400
 0% 

NVault reands data once on the map? ;o


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Screeaam..
Senior Member
Join Date: Jun 2010
Location: Poland
Old 06-29-2012 , 21:15   NVault reands data once on the map? ;o
Reply With Quote #1

Hello! I'm using nvault_util http://forums.alliedmods.net/showthread.php?t=139584 and I have problem.

The file saves some ID nvault where the key is Nick writes such a random ID.

Code:
public Save(id)
{
	new vaultkey[128],vaultdata[256], nick[35];
	get_user_name(id, nick, 34);
	
	format(vaultdata, charsmax(vaultdata),"#%i", GID[id]); // GID[id] = Random ID;
	
	format(vaultkey, charsmax(vaultkey),"%s-GID", name);
	nvault_set(vaultGID,vaultkey,vaultdata);
	
	return PLUGIN_CONTINUE;
}
And I'm using NVault_Util to retrieve datas where GID[data] == GID[id]:

Code:
public GetData(id)
{
	new iPos , szKey[ 32 ] , szVal[ 64 ] , iTimeStamp, GID2;
	new iVaultHandle = nvault_util_open("GID2")
	new iCount = nvault_util_count(iVaultHandle);
	new name[35];
	
	for ( new iCurrent = 1 ; iCurrent <= iCount ; iCurrent++ )
	{
		iPos = nvault_util_read( iVaultHandle , iPos , szKey , charsmax( szKey ) , szVal , charsmax( szVal ) , iTimeStamp );
		
		replace_all(szVal, 63, "#", " ");
		
		new date[32];
		parse(szVal, date, 31);
		
		GID2 = str_to_num(dane);
		
		if(GID[id] == GID2)
		{
			format(name, 34, "%s",szKey);
			name[strlen(name)-4] = 0;
			client_print(id, print_chat, "%s", name);
		}
	}
	nvault_util_close(iVaultHandle);
}
But when someone writes a GID in NVault during the game, he no longer appears in GetData(id), until a map change can I fix it somehow?

It seems that once NVault reads data at startup and then does not. I tried to load the data again in the game, but it did not help.
Screeaam.. is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:16.


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