Raised This Month: $ Target: $400
 0% 

Help me please.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
dantrix
New Member
Join Date: Feb 2009
Old 08-24-2010 , 16:41   Help me please.
Reply With Quote #1

PHP Code:
public client_disconnect(id)
{
    if(
get_pcvar_num(lives) == 1)
    {
        
set_task(8.0"RestKarmaLive"id)
    }
}
public 
RestKarmaLive(id)
{
    if(!
is_user_connected(id)){
        
LoadKarma(id);
        new 
name[32];
        
get_user_name(idname31)
        
karma[id] -= 1;
        
client_print(0,print_chat"%L"LANG_PLAYER"LIVE_QUIT"name1)
        
server_print("%s lost karma!  KARMA: %d"namekarma[id])
        
SaveKarma(id);
    }
    

Hi.. i tried if the user disconnect ( with the cvar sv_live == 1 ) , and not reconnect yet in 8 seconds.., karma[id] -= 1(in nvault) .. and he's reconnect before past 8 second do nothing(duh)..
the LoadKarma ( just extrat values from nVault )
and the SaveKarma ( -.- saving nVault values).

server_print and the task work, but not decreasing 1 in the karma[id] ..

thx...
dantrix is offline
 


Thread Tools
Display Modes

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 21:56.


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