Raised This Month: $ Target: $400
 0% 

AMXX: Saving data over mapchange?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-16-2009 , 11:54   Re: AMXX: Saving data over mapchange?
Reply With Quote #1

You could save the data in nVault, this is the simplest way IMO.

You can use the players STEAMID\IP as the save\lookup key and save the appropriate variable info as the data.

Example, on map change (client_disconnect) save the below key to vault.

new szKey[256];
formatex( szKey , 255 , "%d %d %d %d" , g_TK[id] , g_HS[id] , g_Kills[id] , g_Deaths[id] )

//The entry to vault will look like this: 44 0 123 3434
nvault_set( g_Vault , szAuthID , szKey )

On client_putinserver, read these values, parse them, and assign to appropriate variables.

new szKey[256];
//44 0 123 3434
nvault_get( g_Vault , szAuthID , szKey , 255 )
__________________

Last edited by Bugsy; 04-16-2009 at 11:59.
Bugsy is offline
Reply



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 02:19.


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