Raised This Month: $32 Target: $400
 8% 

Delete HUD


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 05-10-2009 , 04:39   Delete HUD
Reply With Quote #1

How do i delete the health, armor and radar HUD?
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 05-10-2009 , 04:56   Re: Delete HUD
Reply With Quote #2

http://wiki.amxmodx.org/Half-Life_1_...nts#HideWeapon
__________________
xPaw is offline
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 05-10-2009 , 05:07   Re: Delete HUD
Reply With Quote #3

I guess this wouldnt work..
PHP Code:
public client_putinserver(id)
{
    (
1<<3)

__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 05-10-2009 , 05:15   Re: Delete HUD
Reply With Quote #4

PHP Code:
#include <amxmodx>

new g_msgHideWeapon;
new 
g_msgCrosshair;

public 
plugin_init() {
    
register_event"ResetHUD""eResetHUD""be" );
    
    
g_msgHideWeapon    get_user_msgid"HideWeapon" );
    
g_msgCrosshair    get_user_msgid"Crosshair" );
}

public 
eResetHUDid ) {
    if( !
is_user_botid ) ) {
        
message_beginMSG_ONE_UNRELIABLEg_msgHideWeapon_id );
        
write_byte( ( << << ) );
        
message_end();
        
        
message_beginMSG_ONE_UNRELIABLEg_msgCrosshair_id );
        
write_byte);
        
message_end();
    }

__________________

Last edited by xPaw; 05-10-2009 at 06:24.
xPaw is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 05-10-2009 , 05:16   Re: Delete HUD
Reply With Quote #5

It's good idea to do it on "ResetHUD" event because the HUD resets when "ResetHUD" is called.
Code:
#include <amxmodx> #include <hamsandwich>   new g_iMsgHideWeapon;   public plugin_init() {         register_event("ResetHUD", "eventResetHUD", "be");         RegisterHam(Ham_Spawn, "player", "fwdPlayerSpawn", 1);         g_iMsgHideWeapon = get_user_msgid("HideWeapon"); }   public eventResetHUD(iCl) {         if (!is_user_alive(iCl))                 return;           message_begin(MSG_ONE, g_iMsgHideWeapon, _, iCl);         write_byte(1<<3);         message_end(); }   public fwdPlayerSpawn(iCl) {         if (!is_user_alive(iCl))                 return;           eventResetHUD(iCl); }
EDIT: Damn xPaw.
__________________
hleV is offline
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 05-10-2009 , 05:17   Re: Delete HUD
Reply With Quote #6

You do ResetHUD too?
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 05-10-2009 , 05:19   Re: Delete HUD
Reply With Quote #7

hleV, calling on spawn is useless
__________________
xPaw is offline
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 05-10-2009 , 05:21   Re: Delete HUD
Reply With Quote #8

Really most i want to use xPaws because its only using one include, well is that good enough then?
PHP Code:
public eResetHUDid 
{
    if( !
is_user_botid ) ) 
    {
    
message_beginMSG_ALLget_user_msgid"HideWeapon" ), _id );
    
write_byte( ( << ) );
    
message_end();
    
    
message_beginMSG_ALLget_user_msgid"Money" ), _id);
    
write_byte( ( << ) );
    
message_end();
    
        
    
message_beginMSG_ALLget_user_msgid"Crosshair" ), _id );
    
write_byte);
    
message_end();
    }

Why dont it work?.. I want to delete money HUD
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.

Last edited by TitANious; 05-10-2009 at 05:43.
TitANious is offline
Send a message via MSN to TitANious
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 05-10-2009 , 06:18   Re: Delete HUD
Reply With Quote #9

Quote:
Originally Posted by xPaw View Post
hleV, calling on spawn is useless
Somewhy it didn't worked for me in same case without hooking spawn.
__________________

Last edited by hleV; 05-10-2009 at 06:21.
hleV is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 05-10-2009 , 06:22   Re: Delete HUD
Reply With Quote #10

Quote:
Why dont it work?.. I want to delete money HUD
Code updated. watch up.
__________________
xPaw 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 01:50.


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