Hello,
I have a problem with nVault loading.
Code:
PHP Code:
public client_authorized( id )
{
if(g_bMapBanned)
return PLUGIN_HANDLED
if ( !( g_BotOrHLTV[ id ] = bool:( is_user_bot( id ) || is_user_hltv( id ) ) ) )
{
get_user_authid( id , g_AuthID[ id ] , charsmax( g_AuthID[ ] ) );
nvault_get_array( g_Vault , g_AuthID[ id ] , pdData[ id ][ PlayerData:0 ] , sizeof( pdData[ ] ) );
}
return PLUGIN_HANDLED
}
public client_disconnected( id )
{
if(g_bMapBanned)
return PLUGIN_HANDLED
if ( !g_BotOrHLTV[ id ] )
{
get_user_name( id , pdData[ id ][ PlayerName ] , charsmax( pdData[][ PlayerName ] ) );
nvault_set_array( g_Vault , g_AuthID[ id ] , pdData[ id ][ PlayerData:0 ] , sizeof( pdData[ ] ) );
}
return PLUGIN_HANDLED
}
public DeathMsg()
{
if(g_bMapBanned || !is_user_connected(id))
return PLUGIN_HANDLED
new iKiller = read_data( 1 );
new iVictim = read_data( 2 );
pdData[iVictim][Deaths]++;
pdData[iKiller][Kills]++;
pdData[iKiller][Headshot] += read_data( 3 );
return PLUGIN_HANDLED
}
The problem is when a new player is joining the server, he receive +1 Death.
It worked for 3 maps, then it stored as I said above.
Registered events:
PHP Code:
register_event( "DeathMsg" , "DeathMsg" , "a" , "4=knife" , "1>0" );
.
Anyone, any idea?
__________________