Raised This Month: $ Target: $400
 0% 

hud


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
jackas
Senior Member
Join Date: Feb 2011
Old 12-05-2011 , 10:26   hud
Reply With Quote #1

can anyone edit this plugin ...that show permanent hud when connected?
PHP Code:
#include <amxmodx>
#include <nvault>

new g_NvID;

public 
plugin_init()
    {
    
    
g_NvID nvault_open("timepvault");
}

public 
plugin_end()
    {
    
nvault_close(g_NvID);
}

public 
client_disconnect(id)
    {
    new 
sztimep[8];
    new 
szAuthID[35];
    new 
itimep;
    new 
ts;
    
    
get_user_authid(idszAuthID34);
    
    if( !
nvault_lookupg_NvIDszAuthID sztimep ts ) )
        {
        
//Users first disconnect
        
format(sztimep7"%d" get_user_time(id1) );
        
nvault_setg_NvID szAuthID sztimep);  
    }
    else
    {
        
//All other disconnects
        
itimep str_to_num(sztimep) + get_user_time(id1);
        
format(sztimep7"%d" itimep );
        
nvault_setg_NvID szAuthID sztimep);
    }
}

public 
cmd_Distimep(id)
    {
    new 
szTime[8];
    new 
szAuthID[35];
    new 
ts;
    new 
name[32]
    
    new 
iCurTime get_user_timeid );
    new 
iTotalTime 0;
    
    
get_user_authid(idszAuthID34);
    
get_user_name(idname31);
    
    if( 
nvault_lookup(g_NvIDszAuthID szTime7ts) )
        
iTotalTime str_to_num(szTime);
    
    
set_hudmessage(2001000, -1.00.3200.01.00.00.04)  
    
show_hudmessage(id"time: %d minute(s).^nfinal time: %d minute(s)", (iCurTime 60), ((iCurTime iTotalTime) / 60));
    
    
set_task(1.0"cmd_Distimep"id)

__________________
For our new family member's in alliedmods
Quote:
Originally Posted by bo0m View Post
Ok, there are a couple ways to find this, here are about 5:
1. Search
2. Search again
3. If you don't find it, then search again.
4. After searching the 3rd time, search again
5. Then when you are tired of searching, just search some more!!!!

Last edited by jackas; 12-05-2011 at 10:27.
jackas 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 20:55.


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