Raised This Month: $147 Target: $400
 36% 

[L4D2] How do you make this hud?


Post New Thread Reply   
 
Thread Tools Display Modes
Localia
New Member
Join Date: Sep 2020
Old 11-15-2020 , 06:26   Re: [L4D2] How do you make this hud?
Reply With Quote #11

I know who made that, he implemented it with extensions
Localia is offline
HarryPotter
Senior Member
Join Date: Sep 2017
Location: TW
Old 11-16-2020 , 22:56   Re: [L4D2] How do you make this hud?
Reply With Quote #12

Quote:
Originally Posted by Localia View Post
I know who made that, he implemented it with extensions
How does he update the number of players and the current date in real time?
can he share the trick?
__________________

Last edited by HarryPotter; 11-16-2020 at 23:56.
HarryPotter is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 11-16-2020 , 23:29   Re: [L4D2] How do you make this hud?
Reply With Quote #13

One way is rewriting the vscript file (with the player count) and making the server run it again. I did that for tank hp once but is not stable yet.
__________________
Marttt is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Brexit
Old 11-16-2020 , 23:57   Re: [L4D2] How do you make this hud?
Reply With Quote #14

Totally forgot to commit these offsets vscript uses the CTerrorGameRulesProxy you should beable to set/get the entprops using the GameRules_* prop functions to display that stuff without EMS functions.

PHP Code:
GameRules_SetProp,
GameRules_GetProp,
ECT
These are the named entprops highlighted in link below.
https://github.com/LuxLuma/l4d2_stru...es.h#L249-L259

This is without the abstraction that using the EMS gives you, so this is more of a raw way of getting at it without vscript, so it's all manual.

This should work not tested at all.

Notes:
https://developer.valvesoftware.com/.../Appendix:_HUD
Some data in entprops may need researching this is bypassing EMS HUD abstraction.
__________________
Lux is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 11-23-2020 , 23:14   Re: [L4D2] How do you make this hud?
Reply With Quote #15

Nice Lux,

I did some tests and it worked, but I'm having a problem to set the text string for the other huds, I only achieved to set for the first hud, but since is an array of string (seems) I didn't find a method on SM that does that.

GameRules_SetPropString doesn't accept an index as parameter
__________________
Marttt is offline
Reply


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 14:01.


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