Raised This Month: $ Target: $400
 0% 

nVault Problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 09-04-2008 , 19:26   nVault Problem
Reply With Quote #1

Hi..i have this code, but it doesn't work.
PHP Code:
public client_disconnect(id)
{
    static 
    
Key[64],Value[64],name[32],
    
stats[8],body[8],stats2[4],
    
rank_pos,Vault;
    
rank_pos get_user_stats(id,stats,body)
    
get_user_stats2(id,stats2);
    
total[id] = stats2[1] + stats2[2] + stats2[3] + stats[0] - stats[1];
    
    
Vault nvault_open("war_points");
    
get_user_name(id,namesizeof name 1);
    
formatex(Keysizeof Key 1"%s-War_Points-%d",name,rank_pos);
    
formatex(Value,sizeof Value 1"%d"total[id]);
    
nvault_set(VaultKeyValue);
    
nvault_close(Vault);
}
public 
client_putinserver(id)
{
    static 
Key[64], Value[64], name[32],Vault;
    
get_user_name(id,namesizeof name 1);
    
Vault nvault_open("war_points");
    
formatex(Keysizeof Key 1"%s-War_Points:",name);
    
nvault_get(VaultKeyValuesizeof Value 1);
    
nvault_close(Vault);
    
Number[id] = str_to_num(Value);
    
set_task(5.0,"changewithpoints",id);
}
public 
changewithpoints(id)
{
    if(!
is_user_connected(id))
        return 
PLUGIN_CONTINUE;
    new 
name[32],Buffer[64],value;
    
get_user_name(id,name,31);
    if(
Number[id] > 0)
        
value 100 Number[id];
    else if(
Number[id] < 0)
        
value 100 Number[id];
    switch(
get_user_team(id))
    {
        case 
1formatex(Buffer,63,"b.%s<%d>",name,value);
        case 
2formatex(Buffer,63,"a.%s<%d>",name,value);
    }
    
client_cmd(id,"name ^"%s^"",Buffer);
    return 
PLUGIN_CONTINUE;

I want to change the name like this:
Code:
a.player<150>
for example...
* 100 - default number
* 150 - example number...bomb exploded,+defused,+planted + kills - deaths
__________________

anakin_cstrike 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 03:17.


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