Raised This Month: $ Target: $400
 0% 

How to remove HUD elements one by one?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Igoreso
Junior Member
Join Date: Aug 2008
Old 08-30-2008 , 09:43   How to remove HUD elements one by one?
Reply With Quote #1

Yeah, you heard right. My question is "How to remove HUD elements (health, armor, time, bullets in clip, all bullets, money, radar, crosshair, buy / bomb and another icons) one by one?"
Full info there: http://forums.alliedmods.net/showthread.php?t=76326
Igoreso is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-30-2008 , 09:48   Re: How to remove HUD elements one by one?
Reply With Quote #2

Without using client cvar I think there is only this event.

http://wiki.amxmodx.org/Half-Life_1_...nts#HideWeapon but it doesn't all you want.
__________________
Arkshine is offline
Igoreso
Junior Member
Join Date: Aug 2008
Old 08-31-2008 , 14:48   Re: How to remove HUD elements one by one?
Reply With Quote #3

Ok, I've tried to write my plugin looking on csdm_mormalizer code. Here is my code but in game plugin not removes HUD elements.
UPD: I deleted my code.

Last edited by Igoreso; 09-02-2008 at 13:08.
Igoreso is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 08-31-2008 , 18:27   Re: How to remove HUD elements one by one?
Reply With Quote #4

add
Code:
		register_message(g_msgHideWeapon, "msgHideWeapon")
to plugin_init()
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Igoreso
Junior Member
Join Date: Aug 2008
Old 09-01-2008 , 09:13   Re: How to remove HUD elements one by one?
Reply With Quote #5

Big Thanks to Arkshine and Emp`! + karma (I don't know if my karma will be green). Soon I will add some cvars and post my plugin
Igoreso is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-01-2008 , 09:17   Re: How to remove HUD elements one by one?
Reply With Quote #6

Don't forget to remove crosshair ( see the event for that ) for some flags.
__________________
Arkshine is offline
Igoreso
Junior Member
Join Date: Aug 2008
Old 09-01-2008 , 12:15   Re: How to remove HUD elements one by one?
Reply With Quote #7

Ok, but I think that I will use smth like
amx_hud_remove_crosshair 1
not
amx_hud_remove abcde
because I have almost 0 experience in amxx coding
Igoreso is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-01-2008 , 12:40   Re: How to remove HUD elements one by one?
Reply With Quote #8

No, I mean, some flags from HideWeapon event add an extra crosshair, you have to remove it using Crosshair event.
__________________
Arkshine is offline
Igoreso
Junior Member
Join Date: Aug 2008
Old 09-01-2008 , 15:34   Re: How to remove HUD elements one by one?
Reply With Quote #9

Oh, I understand. I done my code and it works but with one problem: changes take effect only after server restart. It's strange because I wrote "public onNewRound()"... Here is full code. (I don't care if some faggot will steal it, I've made it almost for my enjoy only)
UPD: Now I'm trying to do some console command like "amx_hud_update" but I don't know if it will work.
UPD2: I'm not if non-admins can change cvars, any suggestions?
UPD3: Wrote "amx_hud_update" but there is no such command in console And also nothing is hided I'm feeling myself like fool noob
UPD4:
Quote:
Originally Posted by xPaw View Post
i dont see any onNewRound in init, only public, add this
PHP Code:
applyCVars() 
in to resethud
Oh, thanks I deleted code from this post.

Last edited by Igoreso; 09-02-2008 at 13:09.
Igoreso is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-02-2008 , 08:10   Re: How to remove HUD elements one by one?
Reply With Quote #10

i dont see any onNewRound in init, only public, add this
PHP Code:
applyCVars() 
in to resethud
__________________
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 03:11.


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