There's a possibility that the death(s) remain there from the previous player on that slot. nvault_get_array() only fills the array if the player has data stored. So the below sequence of events would cause a connecting player to have data from the previous player.
1. Player A on slot 1 had 4 deaths. They disconnect.
2. Player B connects on slot 1. They have no data stored in the vault so nvault_get_array() essentially does nothing.
3. Player B has Player A's data leftover in pdData array.
I would clear out the pdData[ SLOT ] on disconnect.
Code:
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[ ] ) );
arrayset( pdData[ id ] , 0 , sizeof( pdData[] ) );
}
return PLUGIN_HANDLED
}
__________________