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

[L4D 1/2] Voice hud convinient way


Post New Thread Reply   
 
Thread Tools Display Modes
Author
glhf3000
Member
Join Date: Aug 2010
Location: middle-universe
Plugin ID:
8644
Plugin Version:
1.3
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    23 
    Plugin Description:
    Up to 10 players speaking not overlapping any game UI or FOV
    Old 02-20-2024 , 10:50   [L4D 1/2] Voice hud convinient way
    Reply With Quote #1

    Info
    This is a plugin for L4D2 servers with 10-20 players. It displays a list of speakers in two columns at the bottom right of the screen. The column closer to the edge of the screen is filled first; when there are 5+ speakers talking simultaneously, the second column to the left of the first one is also filled. It does not overlap the game's HUD elements, does not cover the gameplay area, does not distract from the game, and supports sv_alltalk (only 10 speakers will be shown). Displays correctly on all resolutions from 1376x768 to 2560x1440+. There is an option to move list around the screen with admin cmd.
    Sсreenshots
    Attached
    Commands
    vhud_toogle_edit - toggle WASD list-moving mode (speed is 1 %/sec). Keep in mind that at different resolutions hud is rendered differently

    vhud_toogle_alignment - switch left/right alignment of text

    vhud_toogle_order - switch which column fills first, right or left. May need this in if you choose to move list to the left side
    Cvars
    l4d2_voice_hud_pos_left/right_x/y - coordinates of columns

    l4d2_voice_hud_pos_width/height - columns size in % of the screen

    l4d2_voice_hud_alignment - left/right (256/768)

    l4d2_voice_hud_inf_shift_x - shift of the list on X for inf or spec(if alltalk on) -0.025 for the list not to overlap "spectating at ..."

    l4d2_voice_hud_fill_order - 0 - right first, then left; 1 - left first, then right

    How to change position
    Changelog
    1.1 - added moving cmds and pos cvars
    1.2 - editor index check
    1.3 - added cmd/cvar to switch which column fills first, left or right
    Attached Thumbnails
    Click image for larger version

Name:	highres.jpg
Views:	274
Size:	97.2 KB
ID:	203311   Click image for larger version

Name:	lowres.jpg
Views:	214
Size:	94.7 KB
ID:	203312   Click image for larger version

Name:	single-speaking-player.jpg
Views:	209
Size:	92.1 KB
ID:	203313  
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_voice_hud.sp - 29 views - 15.4 KB)

    Last edited by glhf3000; 03-31-2024 at 02:47. Reason: upd 20+108+
    glhf3000 is offline
    noto3
    Member
    Join Date: Jan 2021
    Old 02-20-2024 , 17:18   Re: [L4D 1/2] Voice hud convinient way
    Reply With Quote #2

    warning 217: loose indentation
    warning 217: loose indentation
    warning 217: loose indentation
    warning 217: loose indentation
    warning 203: symbol is never used: "g_tUpdateInterval"
    warning 203: symbol is never used: "g_iSlot"
    warning 203: symbol is never used: "g_iHud_Infected_Flags"
    warning 203: symbol is never used: "g_iHud_Survivors_Flags"
    warning 203: symbol is never used: "g_iHud_Alltalk_Flags"


    Suggestion: Add the ability to select where to display the HUD (top-left, top-right, etc)

    Last edited by noto3; 02-20-2024 at 17:36.
    noto3 is offline
    glhf3000
    Member
    Join Date: Aug 2010
    Location: middle-universe
    Old 02-21-2024 , 03:04   Re: [L4D 1/2] Voice hud convinient way
    Reply With Quote #3

    1.1 - added moving cmds and pos cvars
    1.2 - editor index check
    1.3 - added cmd/cvar to switch which column fills first, left or right

    Last edited by glhf3000; 02-21-2024 at 03:42.
    glhf3000 is offline
    S.A.S
    Member
    Join Date: Jul 2023
    Old 03-30-2024 , 06:14   Re: [L4D 1/2] Voice hud convinient way
    Reply With Quote #4

    Code:
    //// l4d2_voice_hud.sp
    //
    // l4d2_voice_hud.sp(271) : warning 217: inconsistent indentation (did you mix tabs and spaces?)
    // l4d2_voice_hud.sp(274) : warning 217: inconsistent indentation (did you mix tabs and spaces?)
    // l4d2_voice_hud.sp(364) : warning 217: inconsistent indentation (did you mix tabs and spaces?)
    // l4d2_voice_hud.sp(368) : warning 217: inconsistent indentation (did you mix tabs and spaces?)
    // Code size:         13504 bytes
    // Data size:         4580 bytes
    // Stack/heap size:      17024 bytes
    // Total requirements:   35108 bytes
    //
    // 4 Warnings.
    S.A.S is offline
    sherlygavell
    New Member
    Join Date: Mar 2024
    Old 03-30-2024 , 06:20   Re: [L4D 1/2] Voice hud convinient way
    Reply With Quote #5

    thank u
    sherlygavell is offline
    glhf3000
    Member
    Join Date: Aug 2010
    Location: middle-universe
    Old 03-30-2024 , 12:28   Re: [L4D 1/2] Voice hud convinient way
    Reply With Quote #6

    Quote:
    Originally Posted by S.A.S View Post
    Code:
    //// l4d2_voice_hud.sp
    //
    // l4d2_voice_hud.sp(271) : warning 217: inconsistent indentation (did you mix tabs and spaces?)
    // l4d2_voice_hud.sp(274) : warning 217: inconsistent indentation (did you mix tabs and spaces?)
    // l4d2_voice_hud.sp(364) : warning 217: inconsistent indentation (did you mix tabs and spaces?)
    // l4d2_voice_hud.sp(368) : warning 217: inconsistent indentation (did you mix tabs and spaces?)
    // Code size:         13504 bytes
    // Data size:         4580 bytes
    // Stack/heap size:      17024 bytes
    // Total requirements:   35108 bytes
    //
    // 4 Warnings.
    PHP Code:
    D:\SourceMod\scripting\spcomp.exe -"D:\SourceMod\scripting" "D:\SourceMod\scripting\l4d2_voice_hud(2).sp"
    Process started (PID=47644) >>>
    SourcePawn Compiler 1.12.0.7107
    Copyright 
    (c1997-2006 ITB CompuPhase
    Copyright 
    (c2004-2021 AlliedModders LLC

    Code size
    :         13748 bytes
    Data size
    :         4724 bytes
    Stack
    /heap size:      17024 bytes
    Total requirements
    :   35496 bytes
    <<< Process finished (PID=47644). (Exit code 0
    i dont have any, though identation is different on these lines, double checked, maybe some spcomp 1.12 bug
    glhf3000 is offline
    S.A.S
    Member
    Join Date: Jul 2023
    Old 03-30-2024 , 14:26   Re: [L4D 1/2] Voice hud convinient way
    Reply With Quote #7

    I don't use sm 12, I use sm 11
    S.A.S is offline
    little_froy
    Senior Member
    Join Date: May 2021
    Old 03-30-2024 , 14:30   Re: [L4D 1/2] Voice hud convinient way
    Reply With Quote #8

    Quote:
    Originally Posted by glhf3000 View Post
    PHP Code:
    D:\SourceMod\scripting\spcomp.exe -"D:\SourceMod\scripting" "D:\SourceMod\scripting\l4d2_voice_hud(2).sp"
    Process started (PID=47644) >>>
    SourcePawn Compiler 1.12.0.7107
    Copyright 
    (c1997-2006 ITB CompuPhase
    Copyright 
    (c2004-2021 AlliedModders LLC

    Code size
    :         13748 bytes
    Data size
    :         4724 bytes
    Stack
    /heap size:      17024 bytes
    Total requirements
    :   35496 bytes
    <<< Process finished (PID=47644). (Exit code 0
    i dont have any, though identation is different on these lines, double checked, maybe some spcomp 1.12 bug
    add
    #pragma tabsize 0
    at the beginning of the source file.
    little_froy is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 03-30-2024 , 14:58   Re: [L4D 1/2] Voice hud convinient way
    Reply With Quote #9

    Quote:
    Originally Posted by little_froy View Post
    add
    #pragma tabsize 0
    at the beginning of the source file.
    No, fix the actual issue instead of covering up problems.

    inconsistent indentation means in those lines there is a mix of tabs and spaces to create the indentation. It's just a warning, but for a cleaner compile fix those issues. Probably 4 spaces somewhere instead of a tab.
    __________________
    Silvers is offline
    S.A.S
    Member
    Join Date: Jul 2023
    Old 03-30-2024 , 17:43   Re: [L4D 1/2] Voice hud convinient way
    Reply With Quote #10

    You're right, there are a lot of extra spaces.
    S.A.S 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 20:47.


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