Code:
public plugin_cfg()
{
g_iValut = nvault_util_open( "valut" );
}
public client_authorized( id )
{
get_user_authid( id , g_szAuthid[ id ] , charsmax( g_szAuthid[] ) );
new iPos , szKey[ 32 ] , szVal[ 64 ] , iTimeStamp;
new iCount = nvault_util_count( g_iValut );
for ( new iCurrent = 1 ; iCurrent <= iCount ; iCurrent++ )
{
iPos = nvault_util_read( g_iValut , iPos , szKey , charsmax( szKey ) , szVal , charsmax( szVal ) , iTimeStamp );
if ( equal( szKey , g_szAuthid[ id ] ) )
{
g_iVal[ id ] = str_to_num( szVal );
break;
}
}
}
public plugin_end()
{
nvault_util_close( g_iValut );
}
Is it right ?
if so, the problem is coming,
1. whether I should use the loop to get the player data when player is connecting to the server ?
2. If I want to set player data, just use nvault's nvault_set(), right ?
__________________