AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Code Snippets/Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=83)
-   -   Pijudo: new hud menu system (https://forums.alliedmods.net/showthread.php?t=327394)

Roccoxx 09-16-2020 09:17

Pijudo: new hud menu system
 
3 Attachment(s)
Well this is a menu system per hud, I always wanted to make one when I was a teenager but I did not have the capacity to do it, so I share it with you. I publish it more as a contribution than as a plugin because the idea is that it is a guide and that they make the modifications that they believe necessary in terms of menu positions and elements.

The system uses 3 dhud: 1 for the title, X for the items and 1 for the Exit, Return, Next options.

Where X depends on the content of the elements, minimum 1 DHUD.

It has support for both static menus and dynamic menus.

Natives

Spoiler


Example
Spoiler


Important: the title of hud_menu_register and hud_menu_create_title must match!

Credits:
Matias_Esf -> Testing
Metalicross -> For guiding me to the game sdk to investigate the dhud
r0ma' -> For the suggestions <3

Put HudMenu.amxx before your plugins that use the menu.

Some images


GITHUB

Supremache 09-16-2020 15:45

Re: Pijudo: new hud menu system
 
If i used this plugin it will make drop fps ??
Some of huds in menu will get disappear and appear like default dhud?
Mean, when i use more then two hud in one faction the huds will get disappear and appear and if i used more than 5 hud in server i will get drop fps and server will bugging !!!!
Have you tested it on server have 32/32 players "FULL" ?

Roccoxx 09-16-2020 17:25

Re: Pijudo: new hud menu system
 
Quote:

Originally Posted by Supremache (Post 2717959)
If i used this plugin it will make drop fps ??
Some of huds in menu will get disappear and appear like default dhud?
Mean, when i use more then two hud in one faction the huds will get disappear and appear and if i used more than 5 hud in server i will get drop fps and server will bugging !!!!
Have you tested it on server have 32/32 players "FULL" ?

You can try it before asking. I have tested it and also other programmers, we had no problems.
They are dhud not hud ...
I have tested with 6 dhud at the same time (4 items + title + exit / entry option)
I have tried to replicate the part of the calculation of the position X and y based on the number of characters to optimize the dhud channels, but I have not had any luck, if you want you can try and give me a hand: https://github.com/alliedmodders/hls...ssage.cpp#L242
Regarding your last question, I have not been able to test it with 32 players, today it is an old game, and here there are very few players and it is difficult to fill a server.
It is an API anyway and you can use it to your liking based on your proposed situations and wishes.

Supremache 09-16-2020 18:36

Re: Pijudo: new hud menu system
 
Quote:

Originally Posted by Roccoxx (Post 2717967)
You can try it before asking. I have tested it and also other programmers, we had no problems.
They are dhud not hud ...
I have tested with 6 dhud at the same time (4 items + title + exit / entry option)
I have tried to replicate the part of the calculation of the position X and y based on the number of characters to optimize the dhud channels, but I have not had any luck, if you want you can try and give me a hand: https://github.com/alliedmodders/hls...ssage.cpp#L242
Regarding your last question, I have not been able to test it with 32 players, today it is an old game, and here there are very few players and it is difficult to fill a server.
It is an API anyway and you can use it to your liking based on your proposed situations and wishes.

Without trying it, When i saw your post about dhud menu, I was shocked, I was think those problems will happens.
I am not sure what will happen to the server by this api system but let others trying it those have a good servers, i want to see how this menu work on server having full players.
I'm sorry but my experience is limit but in the future i think i will help. :wink:

thEsp 09-18-2020 04:23

Re: Pijudo: new hud menu system
 
It's nobody's fault that you still run non-steam servers on a pentium 4 or god knows what.

Supremache 09-24-2020 17:32

Re: Pijudo: new hud menu system
 
Quote:

Originally Posted by thEsp (Post 2718075)
It's nobody's fault that you still run non-steam servers on a pentium 4 or god knows what.

You talking to me !!!, I have my own host but the problem is the game has ended there's no players play like first, Now the top gametracker servers have 25/32 players at morning and at night have maximum 10 players but i testing plugins on my friends servers they have a good servers and as my experience on servers i know more huds in server means "more lag + more drop fps".

Example 5 players are not like 30 players, in normal mod this plugin will be very good but i talking about those server have bigest mod like [zp, ze , bb, etc] anyway i mean zombie mods have alot of effects "sprites" that already making drop fps and with this plugin will make like bomb in the case xD.

P.s: All that for low pc's but who have high pc with high graphic card will never get like those problems :nono:

I hope you understand, i tryed to used like gfx instead of hud but i got some problems like gfx get much time for show and sometime never showing etc.

Roccoxx 09-24-2020 17:40

Re: Pijudo: new hud menu system
 
Quote:

Originally Posted by Supremache (Post 2718691)
You talking to me !!!, I have my own host but the problem is the game has ended there's no players play like first now the top servers have 25/32 players at morning and at night have maxmun 10 players but i tested plugins on my friends servers they have a good servers and as my experience on servers i know more huds in server means "more lag + more drop fps".

Example 5 players are not like 30 players, in normal mod this plugin will be very good but i talking about those server have bigest mod like [zp, ze , bb, etc] anyway i mean zombie mods have alot of effects "spirts" that already making drop fps and with this plugin will make like bomb in the case xD.

P.s: All that for low pc's but who have high pc with high graphic card will never get like those problems :nono:

I hope you understand, i tryed to used like gfx instead of hud but i got some problems like gfx get much time for show and sometime never showing etc.

Nowadays and from experience I have seen that all zp have several huds sprites and other things working at the same time, and I agree with thEsp, you speak as if we were in the year 2005-2010 but we are in 2020! Today most use a server with 1000 fps, decent processors, RAM and connections, people have good connections and those with a CPU running on carbon are a very rare case. In addition, the drop in fps is not only conditioned by the huds, there are many other factors (which are irrelevant today by the way), you should worry more about the way you program than about a resource.

Supremache 09-24-2020 17:52

Re: Pijudo: new hud menu system
 
I used google translate xD
And as i said i was talking about low pc's, only those players have low pc's playing this game until now but in the future we will see this game ended :cry:
As you said we in 2020 and like we are trying to do the best for this game the next generation will not play it but this is the life will never stop on something :cry:

Example for those players still playing cs 1.6:
I got new pc i will play "pubg, fortnite, etc" f*** that old game :grrr:

Roccoxx 09-24-2020 17:54

Re: Pijudo: new hud menu system
 
Quote:

Originally Posted by Supremache (Post 2718697)
I used google translate xD
And as i said i was talking about low pc's, only those players have low pc's playing this game until now but in the future we will see this game ended :cry:
As you said we in 2020 and like we are trying to do the best for this game the next generation will not play it but this is the life will never stop on something :cry:

Example for those players still playing cs 1.6:
I got new pc i will play "pubg, fortnite, etc" f*** that old game :grrr:

You really have no idea what you're saying ...

Supremache 09-24-2020 18:03

Re: Pijudo: new hud menu system
 
I know I entered into another topic but when you said we in 2020 no in 2005 that made me explain you what will happen in the future.
Anyway Leave all that words and dont care, I just was want to show you my point of view!!


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

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