AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to remove HUD elements one by one? (https://forums.alliedmods.net/showthread.php?t=76784)

Igoreso 08-30-2008 09:43

How to remove HUD elements one by one?
 
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

Arkshine 08-30-2008 09:48

Re: How to remove HUD elements one by one?
 
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.

Igoreso 08-31-2008 14:48

Re: How to remove HUD elements one by one?
 
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.

Emp` 08-31-2008 18:27

Re: How to remove HUD elements one by one?
 
add
Code:

                register_message(g_msgHideWeapon, "msgHideWeapon")
to plugin_init()

Igoreso 09-01-2008 09:13

Re: How to remove HUD elements one by one?
 
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 :)

Arkshine 09-01-2008 09:17

Re: How to remove HUD elements one by one?
 
Don't forget to remove crosshair ( see the event for that ) for some flags.

Igoreso 09-01-2008 12:15

Re: How to remove HUD elements one by one?
 
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 :)

Arkshine 09-01-2008 12:40

Re: How to remove HUD elements one by one?
 
No, I mean, some flags from HideWeapon event add an extra crosshair, you have to remove it using Crosshair event.

Igoreso 09-01-2008 15:34

Re: How to remove HUD elements one by one?
 
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 (Post 679969)
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.

xPaw 09-02-2008 08:10

Re: How to remove HUD elements one by one?
 
i dont see any onNewRound in init, only public, add this
PHP Code:

applyCVars() 

in to resethud


All times are GMT -4. The time now is 03:11.

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