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

[L4D1 & L4D2] Display Equipments [v1.0.1 | 18-August-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
8154
Plugin Version:
1.0.1
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    1 
    Plugin Description:
    Configure which equipped items should display on clients back/belt
    Old 08-13-2022 , 21:10   [L4D1 & L4D2] Display Equipments [v1.0.1 | 18-August-2022]
    Reply With Quote #1

    Description

    This plugin hides/shows the equipped items on clients back/belt.

    Features
    • Allow configuring which items should be displayed on clients back/belt.

    Cvars

    A configuration file named "l4d_display_equipments.cfg" will automatically be created for you upon the first run in the "\cfg\sourcemod\" folder.

    PHP Code:
    // [L4D1] Which equipped items should display on clients back/belt.
    // 0 = None, 1 = Kit, 2 = Pills, 4 = Pipe Bomb, 8 = Molotov, 16 = Primary Weapons, 32 = Pistols, 512 = Tongue.
    // Add numbers greater than 0 for multiple options.
    // -
    // Default: "0"
    // Minimum: "0.000000"
    // Maximum: "1023.000000"
    l4d1_display_equipments_display "0"

    // [L4D2] Which equipped items should display on clients back/belt.
    // 0 = None, 1 = Primary Weapons, 2 = Secondary Weapons, 4 = Throwables, 8 = Kit/Defib/Packs, 16 = Pills/Adren, 32 = Tongue, 128 = Diesel.
    // Add numbers greater than 0 for multiple options.
    // -
    // Default: "0"
    // Minimum: "0.000000"
    // Maximum: "255.000000"
    l4d2_display_equipments_display "0"

    // Enable/Disable the plugin.
    // 0 = Disable, 1 = Enable.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_display_equipments_enable "1" 
    Related Game Cvars
    • [L4D1 only] survivor_draw_addons => 0=hides all items, 1=hides healthpack, pills and throwables, 2=shows all items. (default: 2)

    Admin Commands
    • sm_print_cvars_l4d_display_equipments => Print the plugin related cvars and their respective values to the console. (z flag required)

    Change Log

    Spoiler


    Notes
    • This was achieved by changing the player m_iAddonBits netprop value on PostThinkPost.
    • Only survivors are affected since for infecteds the netprop is always 0.
    • The smoker tongue around the survivor also has a related value to display.
    • [L4D1 only] has the survivor_draw_addons cvar that already does something similar.
    • [L4D2 only] Diesel starts to display in the 3rd chapter of "Rain Hard" campaign.
    • [L4D2 only] Flag 64 is a hidden defibrillator model that doesn't appear to be used in-game.

    Thank you!

    Post Reply
    • Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.

    Installation
    • Put the "l4d_display_equipments.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_display_equipments.sp - 357 views - 14.6 KB)
    __________________

    Last edited by Marttt; 01-15-2023 at 12:23.
    Marttt is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 08-14-2022 , 15:38   Re: [L4D1 & L4D2] Display Equipments [v1.0.0 | 13-August-2022]
    Reply With Quote #2

    I think bits in l4d1 is different
    here is what I found.
    PHP Code:
    #define AddonBits_L4D1_Slot1               (1 << 4) // 16
    #define AddonBits_L4D1_Slot2               (1 << 5) // 32
    #define AddonBits_L4D1_Slot3               (1 << 2) // 4
    #define AddonBits_L4D1_Slot4               (1 << 0) // 1
    #define AddonBits_L4D1_Slot5               (1 << 1) // 2
    #define AddonBits_L4D1_SmokerTongue        (1 << 3) // 8 
    __________________
    HarryPotter 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 18:23.


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