AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2]HUD with player list & kill list info like cs (https://forums.alliedmods.net/showthread.php?t=340601)

LinLinLin 11-27-2022 13:34

[L4D2]HUD with player list & kill list info like cs
 
3 Attachment(s)
Introduction:
  • A plugin whcih make L4D2 has the kill info like cs. Look at the attachment of picture you will know the final effect.

Requirement:
  • L4DToolZ.ext
  • l4d2_ems_hud.inc
hud.inc is already in the .7z file, you need install the L4DToolz extension and set the "sv_maxplayer" cvar to let plugin get the corrcet maxplayer count.

Feature:
  • show the current player/max player on the top of left.
  • show your server host name in the middle of the top.
  • player will be list in the left side of the hud base on how many special they kill.
  • player in left side will blink when they dead.
  • kill list like cs in the right top whcih will show who dead and what the weapon is and is headshot or kill behind wall.

Cvar:
Code:

"l4d2_max_player_list"
-description: how much player can be list in the left side of hud. max is 8.
-default: 8

"l4d2_show_which_list" (up 1.0.2)
-description: display which list on screen. 0 = off, 1 = show hostname, 2 = show player list, 4 = show kill list 8 = Current player/Max PLAYER. Add the count to show more of them.
-default: 15



Note:
  • becasuse ems hud position is base on the size of your game screen. i make this plugin in 1600*900 so if you playe the game under this size the hud will get narrow and couldn't show the entire info.
  • my hud.inc in 7z only can be used in sm 1.11.
  • a slot only can have 127 character.

Specials Thank:
  • sorall who provides the inc of hud which can use the whole slot of ems hud.

Update:
Code:

[2023-4-16]: 1.0.3
1. fixed bug when player leave cause the player_list not correct.
2. making no number in kill_list when victim is a bot.


[2022-12-1]: 1.0.2
1. add new cvar to select which part to show on screen.
2. use enum struct to make code more object-oriented.
enum struct HUD
{
        int slot;
        int flag;
        float pos[4];
        char info[128];
        void Place()
        {
                HUDSetLayout(this.slot, HUD_FLAG_TEXT|this.flag, this.info);
                HUDPlace(this.slot, this.pos[0], this.pos[1], this.pos[2], this.pos[3]);
        }
}


Grey83 11-27-2022 15:28

Re: [L4D2]HUD with player list & kill list info like cs
 
2 Attachment(s)
Now it will compile even with SM1.8. =)
But it's better to use SM1.11 (because in SM1.10 and older you can't set an element for GameRules_SetPropString()).
The plugin code was also optimized and cleaned.

KadabraZz 11-27-2022 20:51

Re: [L4D2]HUD with player list & kill list info like cs
 
Brilliant idea, It would be possible to make the bots not have (1) (2) in the name, just the name of the class? it's a bit of visual pollution to see (1) Hunter (2) Hunter.

Marttt 11-28-2022 08:34

Re: [L4D2]HUD with player list & kill list info like cs
 
Nice, I'm also making an include with lots of options to use this HUD, probably will share soon.
Also worth mentioning in the main post, that the HUD string text is limited to 127 characters, so if it goes bigger than that the text may be truncated.

LinLinLin 12-01-2022 08:03

Re: [L4D2]HUD with player list & kill list info like cs
 
Nice work, actually i don't know how the inc work and what is GameRules, i just know how to use these native.

LinLinLin 12-01-2022 08:11

Re: [L4D2]HUD with player list & kill list info like cs
 
this problem happend because i use %N to format the string. you can modify the code by yourself and simply identify the first character of victim name. if is equal to "(" you can format the final string by victim[3] since victim[3] is the whole string except the first three character.

LinLinLin 12-01-2022 08:18

Re: [L4D2]HUD with player list & kill list info like cs
 
Yes now the inc is not the final version. It still hasn't the part of "Special field definitions" and other, which has made by somebody using extension.
But i am not good at this field, i couldn't do some help.

NoroHime 12-01-2022 16:06

Re: [L4D2]HUD with player list & kill list info like cs
 
try like this
PHP Code:

void ReplaceNamePrefix(char[] messageint maxLen) {

    
ReplaceString(messagemaxLen"(1)"""false);
    
ReplaceString(messagemaxLen"(2)"""false);
    
ReplaceString(messagemaxLen"(3)"""false);


:oops:

King_OXO 12-09-2022 07:42

Re: [L4D2]HUD with player list & kill list info like cs
 
you can update the plugin and put a list of people talking on the server (show it to everyone and bliking red)?

Type:

Players Speaking:
1.whitefire
2.NoroHime
3.....

maclarens 01-04-2023 09:16

Re: [L4D2]HUD with player list & kill list info like cs
 
hi!how turn off standart red kill list?!


All times are GMT -4. The time now is 22:07.

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