Raised This Month: $ Target: $400
 0% 

hud


Post New Thread Reply   
 
Thread Tools Display Modes
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
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 12-05-2011 , 12:33   Re: hud
Reply With Quote #2

I don't think it's possible to give someone a hudmessege when they connect, since they're actually still not in the game.
But if you search in scripting help for permanent hud, I'm sure you'll get way more info than you actually need.
Erox902 is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 12-05-2011 , 12:42   Re: hud
Reply With Quote #3

when connected
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 12-05-2011 , 12:54   Re: hud
Reply With Quote #4

Quote:
Originally Posted by tuty View Post
when connected
when connected can't be caught afaik.
Erox902 is offline
kotinha
Senior Member
Join Date: Jun 2009
Location: Alentejo, Portugal :)
Old 12-05-2011 , 13:09   Re: hud
Reply With Quote #5

use the forward client_putinserver() ?
__________________
"If God exists, I hope he has a good excuse." - Woody Allen
kotinha is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 12-05-2011 , 16:59   Re: hud
Reply With Quote #6

Quote:
Originally Posted by tuty View Post
jesus christ man, he want when player is on damn server, i think =))
jesus christ man, there ain't no event for when player is on damn server.
Quote:
Originally Posted by kotinha View Post
use the forward client_putinserver() ?
I'm not sure but I've heard that even this can get called before player actually is on server.

I would've given them at the spawn event, round start log event or team join event( if there is one? ).

But like I said before, search for permanent hud in scripting help and in requests.
You should always search first I found 24 threads just here in requests section alone.

Last edited by Erox902; 12-05-2011 at 17:00.
Erox902 is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 12-05-2011 , 15:27   Re: hud
Reply With Quote #7

Quote:
Originally Posted by Erox902 View Post
when connected can't be caught afaik.
jesus christ man, he want when player is on damn server, i think =))
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
jackas
Senior Member
Join Date: Feb 2011
Old 12-05-2011 , 17:29   Re: hud
Reply With Quote #8

Quote:
Originally Posted by tuty View Post
when connected
Yes, when connected ...No client side commands...Show directly to everyone when connected...

eg :
Attached Thumbnails
Click image for larger version

Name:	svr_info.png
Views:	163
Size:	54.0 KB
ID:	96295  
__________________
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 17:32.
jackas is offline
pacheco
Senior Member
Join Date: Jul 2011
Old 12-05-2011 , 12:50   Re: hud
Reply With Quote #9

PHP Code:
set_hudmessage(2001000, -1.00.3200.01.00.00.04
->
PHP Code:
set_hudmessage(2001000, -1.00.3200.01.00.00.099999999
??
__________________




Last edited by pacheco; 12-05-2011 at 12:50.
pacheco is offline
Reply



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