Raised This Month: $51 Target: $400
 12% 

[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 , 05: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
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 11-16-2020 , 21: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 22:56.
HarryPotter is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 11-16-2020 , 22: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: Cat
Old 11-16-2020 , 22: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.
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 11-23-2020 , 22: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
Mrs cheng
Member
Join Date: Mar 2017
Old 02-03-2021 , 21:35   Re: [L4D2] How do you make this hud?
Reply With Quote #16

Quote:
Originally Posted by Marttt View Post
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
I also did some tests, but I has a problem. The display time of this hud is only short, it seems that it does not exceed 0.1 seconds. How it can continue to display?(using CreateTimer or OnGameFrame is unstable)
Mrs cheng 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 22:01.


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