Raised This Month: $ Target: $400
 0% 

nVault data switching


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 05-22-2020 , 13:58   nVault data switching
Reply With Quote #1

Hello,
I have a problem with nVault loading.
Code:
PHP Code:

public client_authorizedid )
{
    if(
g_bMapBanned)
        return 
PLUGIN_HANDLED

    
if ( !( g_BotOrHLTVid ] = bool:( is_user_botid ) || is_user_hltvid ) ) ) )
    {
        
get_user_authidid g_AuthIDid ] , charsmaxg_AuthID[ ] ) );
        
        
nvault_get_arrayg_Vault g_AuthIDid ] , pdDataid ][ PlayerData:] , sizeofpdData[  ] ) );
    }
    return 
PLUGIN_HANDLED
}

public 
client_disconnectedid )
{
    if(
g_bMapBanned)
        return 
PLUGIN_HANDLED

    
if ( !g_BotOrHLTVid ] )
    {
        
get_user_nameid pdDataid ][ PlayerName ] , charsmaxpdData[][ PlayerName ] ) );
        
        
nvault_set_arrayg_Vault g_AuthIDid ] , pdDataid ][ PlayerData:] , sizeofpdData[  ] ) );
    }
    return 
PLUGIN_HANDLED
}

public 
DeathMsg()
{
    if(
g_bMapBanned || !is_user_connected(id))
        return 
PLUGIN_HANDLED
    
    
new iKiller read_data);
    new 
iVictim read_data);

    
pdData[iVictim][Deaths]++;
    
pdData[iKiller][Kills]++;
    
pdData[iKiller][Headshot] += read_data);
    
    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?
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]

Last edited by Shadows Adi; 05-22-2020 at 18:05.
Shadows Adi is offline
 



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 17:14.


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