Raised This Month: $ Target: $400
 0% 

Fvault system


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Mepetz
New Member
Join Date: Nov 2014
Old 11-15-2014 , 11:41   Re: Fvault system
Reply With Quote #3

Quote:
LoadPoints(id)
{
get_user_name(id, g_playername[id], charsmax(g_playername[]));
static key[32], data[64], iPoints[32], PlayerLevel[32], Playerxp[32];
format(key, charsmax(key), "%s", g_playername[id]);
format(data, charsmax(data), "Points-%d Level-%d XP-%d", g_iUserPoints[id], hnsxp_playerlevel[id], hnsxp_playerxp[id]);

if (fvault_get_data(g_vault_all, key, data, charsmax(data)))
{
parse(data, iPoints, charsmax(iPoints));
g_iUserPoints[id] = str_to_num(iPoints);
}

if (fvault_get_data(g_vault_all, key, data, charsmax(data)))
{
parse(data, PlayerLevel, charsmax(PlayerLevel));
hnsxp_playerlevel[id] = str_to_num(PlayerLevel);
}

if (fvault_get_data(g_vault_all, key, data, charsmax(data)))
{
parse(data, Playerxp, charsmax(Playerxp));
hnsxp_playerxp[id] = str_to_num(Playerxp);
}

}

that code is problem if i create loadpoints for only points .
Load is correct .
If i create loadpoints for xp /lvl /points load isn't good..

public client_putinserver( id )
{
if( is_user_bot( id ) )
return PLUGIN_CONTINUE;

get_user_name( id, g_szName[ id ], sizeof ( g_szName[] ) -1 );
LoadPoints( id );

g_iUserTime[ id ] = 0;
set_task(1.0, "MesajHUD", id+TASK_MESAJHUD, _, _, "b");

g_bUserHas[ id ][ INVIS ] = false;
g_bUserHas[ id ][ SPEED ] = false;
g_bUserHas[ id ][ GRAVITY ] = false;

return PLUGIN_CONTINUE;

}

public client_disconnect( id )
{
if( is_user_bot( id ) )
return PLUGIN_CONTINUE;

SavePoints( id );
g_bUserHas[ id ][ INVIS ] = false;
g_bUserHas[ id ][ SPEED ] = false;
g_bUserHas[ id ][ GRAVITY ] = false;
hnsxp_playerlevel[ id ] = 0;
hnsxp_playerxp[ id ] = 0;
g_iUserPoints[id] = 0;

return PLUGIN_CONTINUE;

}
Mepetz 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:30.


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