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

[L4D1 & L4D2] Unswap Empty Primary Weapon [v1.0.0 | 29-October-2020]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
7357
Plugin Version:
1.0.0
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    10 
    Plugin Description:
    Prevents swapping to secondary weapon on primary weapon pick up when its clip is empty
    Old 10-29-2020 , 17:25   [L4D1 & L4D2] Unswap Empty Primary Weapon [v1.0.0 | 29-October-2020]
    Reply With Quote #1

    Description

    In vanilla game, if you pick up a primary weapon with no ammo (0), the game switches your active weapon to the secondary (pistol/melee).
    This plugin switches back to the primary weapon.

    Features
    • Allow maintain the primary weapon equiped on pick up.
    • Allow configuring to only apply this behavior on weapons with ammo.

    Steps to Reproduce
    • Pick up a primary weapon.
    • Shoot until you have 0 bullets left in the current clip.
    • Pick up another primary weapon with clip ammo.
    • Pick up the previous primary weapon.
    • Now your primary weapon changed to the secondary.

    Cvars

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

    PHP Code:
    // Enable/Disable the plugin.
    // 0 = Disable, 1 = Enable.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_unswap_empty_primary_enable "1"

    // Ignore weapons without ammo.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_unswap_empty_primary_ignore_without_ammo "1" 
    Admin Commands
    • sm_print_cvars_l4d_unswap_empty_primary => Print the plugin related cvars and their respective values to the console. (z flag required)

    Change Log

    Spoiler


    Notes
    • Bots aren't affected by this plugin.
    • Only applies to survivors.

    Conflicting Plugins

    Related Plugins

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

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

    Last edited by Marttt; 01-15-2023 at 12:18.
    Marttt is offline
    Tonblader
    Senior Member
    Join Date: Jul 2011
    Location: Peru
    Old 11-16-2020 , 17:52   Re: [L4D1 & L4D2] Unswap Empty Primary Weapon [v1.0.0 | 29-October-2020]
    Reply With Quote #2

    This plugin have conflict with [L4D2] Speedrunner Tools with the cvar:

    st_fastreload 1

    This cvar allows to activate/deactivate the weapon fast reload entering/exiting the idle mode.

    When used in conjunction with this plugin, the bug is that the weapon dont reload weapon clip.

    Last edited by Tonblader; 11-16-2020 at 17:53.
    Tonblader is offline
    thewintersoldier97
    Senior Member
    Join Date: Aug 2021
    Location: Vietnam
    Old 07-25-2022 , 02:06   Re: [L4D1 & L4D2] Unswap Empty Primary Weapon [v1.0.0 | 29-October-2020]
    Reply With Quote #3

    Hello Marttt, does this also affect your carrying primary weap?
    __________________

    Looking for some fun!
    thewintersoldier97 is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 07-25-2022 , 07:18   Re: [L4D1 & L4D2] Unswap Empty Primary Weapon [v1.0.0 | 29-October-2020]
    Reply With Quote #4

    Pickup only
    __________________
    Marttt is offline
    thewintersoldier97
    Senior Member
    Join Date: Aug 2021
    Location: Vietnam
    Old 07-25-2022 , 11:58   Re: [L4D1 & L4D2] Unswap Empty Primary Weapon [v1.0.0 | 29-October-2020]
    Reply With Quote #5

    I see, thank you
    __________________

    Looking for some fun!
    thewintersoldier97 is offline
    zonbarbar
    Member
    Join Date: Jul 2022
    Old 03-12-2023 , 01:48   Re: [L4D1 & L4D2] Unswap Empty Primary Weapon [v1.0.0 | 29-October-2020]
    Reply With Quote #6

    not work
    zonbarbar is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 12-17-2023 , 10:40   Re: [L4D1 & L4D2] Unswap Empty Primary Weapon [v1.0.0 | 29-October-2020]
    Reply With Quote #7

    This plugin is not working anymore? I test today and does not switches back to the primary empty weapon.
    __________________
    HarryPotter is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 12-17-2023 , 10:42   Re: [L4D1 & L4D2] Unswap Empty Primary Weapon [v1.0.0 | 29-October-2020]
    Reply With Quote #8

    Yeah since TLS update stopped working don't know what they have changed still trying to figure it out
    __________________
    Marttt 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 02:49.


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