Raised This Month: $32 Target: $400
 8% 

[L4D2]HUD with player list & kill list info like cs


Post New Thread Reply   
 
Thread Tools Display Modes
Author
LinLinLin
Senior Member
Join Date: Sep 2021
Plugin ID:
8305
Plugin Version:
1.0.0
Plugin Category:
Fun Stuff
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    A hud to show some information on client screen.
    Old 11-27-2022 , 13:34   [L4D2]HUD with player list & kill list info like cs
    Reply With Quote #1

    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]);
    	}
    }
    Attached Thumbnails
    Click image for larger version

Name:	`P`(8JYA%DPDVWV4UZ6(5DN.jpg
Views:	2270
Size:	80.1 KB
ID:	198187   Click image for larger version

Name:	SR5O{H$D2NIR@Z{M~F@8%JC.jpg
Views:	1962
Size:	92.7 KB
ID:	198191  
    Attached Files
    File Type: 7z l4d2_hud_kill_list.7z (14.8 KB, 497 views)

    Last edited by LinLinLin; 04-15-2023 at 14:17.
    LinLinLin is offline
    Grey83
    Veteran Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 11-27-2022 , 15:28   Re: [L4D2]HUD with player list & kill list info like cs
    Reply With Quote #2

    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.
    Attached Files
    File Type: inc l4d2_ems_hud.inc (5.6 KB, 366 views)
    File Type: sp Get Plugin or Get Source (CS_Kill_Hud 1.1.0.sp - 313 views - 10.9 KB)
    __________________
    Grey83 is offline
    KadabraZz
    Senior Member
    Join Date: May 2020
    Old 11-27-2022 , 20:51   Re: [L4D2]HUD with player list & kill list info like cs
    Reply With Quote #3

    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.
    KadabraZz is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 11-28-2022 , 08:34   Re: [L4D2]HUD with player list & kill list info like cs
    Reply With Quote #4

    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.
    __________________
    Marttt is offline
    LinLinLin
    Senior Member
    Join Date: Sep 2021
    Old 12-01-2022 , 08:03   Re: [L4D2]HUD with player list & kill list info like cs
    Reply With Quote #5

    Nice work, actually i don't know how the inc work and what is GameRules, i just know how to use these native.
    LinLinLin is offline
    LinLinLin
    Senior Member
    Join Date: Sep 2021
    Old 12-01-2022 , 08:11   Re: [L4D2]HUD with player list & kill list info like cs
    Reply With Quote #6

    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 is offline
    LinLinLin
    Senior Member
    Join Date: Sep 2021
    Old 12-01-2022 , 08:18   Re: [L4D2]HUD with player list & kill list info like cs
    Reply With Quote #7

    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.
    LinLinLin is offline
    NoroHime
    Veteran Member
    Join Date: Aug 2016
    Location: bed
    Old 12-01-2022 , 16:06   Re: [L4D2]HUD with player list & kill list info like cs
    Reply With Quote #8

    try like this
    PHP Code:
    void ReplaceNamePrefix(char[] messageint maxLen) {

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

    __________________
    NoroHime is offline
    King_OXO
    Senior Member
    Join Date: Dec 2020
    Location: Brazil
    Old 12-09-2022 , 07:42   Re: [L4D2]HUD with player list & kill list info like cs
    Reply With Quote #9

    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.....
    __________________
    My Noob Plugins

    Discord:WhiteFire#1301
    Steam:WhiteFire
    Youtube

    Last edited by King_OXO; 12-09-2022 at 07:42.
    King_OXO is offline
    maclarens
    Senior Member
    Join Date: Jul 2020
    Location: Kz
    Old 01-04-2023 , 09:16   Re: [L4D2]HUD with player list & kill list info like cs
    Reply With Quote #10

    hi!how turn off standart red kill list?!
    maclarens 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 11:09.


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