Raised This Month: $ Target: $400
 0% 

New to nVault


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 06-25-2010 , 01:48   Re: New to nVault
Reply With Quote #1

Code:
new iPoints[33] new g_Vault new g_szAuthID[33][35] public plugin_cfg() {     g_Vault = nvault_open( "zombiedefiance" );           if ( g_Vault == INVALID_HANDLE )         set_fail_state( "Error opening nVault" ); } public plugin_end() {     nvault_close( g_Vault ); } public client_authorized(id) {     get_user_authid( id , g_szAuthID[id] , 34 ); } public cmdSavePoints(id) {     new szPoints[7];        //Data holder for the money amount     new szKey[40];        //Key used to save money "STEAM_0:0:1234MONEY"     formatex( szKey , 39 , "%sPOINTS" , g_szAuthID[id] );     formatex( szMoney, 6 , "%d" , iPoints[id] );           nvault_set( g_Vault , szKey , szPoints );     client_print_color( id, Blue, "^4[ZD]^3 ** Your points were saved to vault **" ); } public cmdGetPoints(id) {     new szKey[40];     formatex( szKey , 39 , "%sPOINTS" , g_szAuthID[id] );     new iMoney = nvault_get( g_Vault , szKey );     if ( iMoney )     {         iPoints[id] = iMoney         nvault_remove( g_Vault , szKey );         client_print_color( id, Blue, "^4[ZD] ^3** Your points were loaded from vault:^4 $%d **", iMoney );     }     else     {         client_print_color( id, Blue, "^4[ZD] ^3** You have no point entries in vault. **" );     } }
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ 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 14:42.


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