Raised This Month: $ Target: $400
 0% 

[L4D1 & L4D2] Weapon Prop Give Fix [v1.0.3 | 23-May-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
7537
Plugin Version:
1.0.3
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    940 
    Plugin Description:
    Fix props not spawning as prop_physics when using 'give' command
    Old 03-03-2021 , 22:22   [L4D1 & L4D2] Weapon Prop Give Fix [v1.0.3 | 23-May-2022]
    Reply With Quote #1

    Description

    This plugin fixes the following props:
    • Propane Canister [give propanetank]
    • Oxygen Tank [give oxygentank]
    • Fireworks Crate (L4D2 only) [give fireworkcrate]
    • Gascan (L4D1 only) [give gascan]

    L4D2 behaviour:
    • When one of the props above is given to a client through the "give" command, if the client is already holding the same item, the new prop will spawn and drop with the incorrect classname (weapon_<propname>), becoming unable to break/ignite/explode.

    L4D1 behaviour:
    • When one of the props above is given to a client through the "give" command, if the client is already holding one of these items, the previous prop will drop with the incorrect classname (weapon_<propname>), becoming unable to break/ignite/explode.

    The correct classname should be prop_physics (Except for weapon_gascan on L4D2).

    A lot of plugins use the "give" command, so this plugin fixes both. (console command and third party plugins)

    Features
    • Allow configuring which prop should be affected by the plugin.
    • Allow setting a delay, or not, to fix the prop.

    Cvars

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

    PHP Code:
    // How long (in seconds) should the plugin wait to fix the prop.
    // 0.0 = No delay (immediately).
    // -
    // Default: "0.0"
    // Minimum: "0.000000"
    l4d_weapon_prop_give_fix_delay "0.0"

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

    // Spawn weapon_fireworkcrate as prop_physics.
    // L4D2 only.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_weapon_prop_give_fix_fireworkscrate "1"

    // Spawn weapon_gascan as prop_physics.
    // L4D1 only.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_weapon_prop_give_fix_gascan "1"

    // Spawn weapon_oxygentank as prop_physics.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_weapon_prop_give_fix_oxygentank "1"

    // Spawn weapon_propanetank as prop_physics.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_weapon_prop_give_fix_propanecanister "1" 
    Admin Commands
    • sm_print_cvars_l4d_weapon_prop_give_fix => Print the plugin related cvars and their respective values to the console. (z flag required)

    Change Log

    Spoiler


    Notes
    • Fireworks Crate fix only applies to L4D2, because L4D1 doesn't have it.
    • Gascan fix only applies to L4D1, because on L4D2 works fine when a weapon is spawned as weapon_gascan.

    Thank you!

    Related Plugins

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

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

    Last edited by Marttt; 02-19-2023 at 22:54.
    Marttt is offline
    AXVXA
    Junior Member
    Join Date: Jan 2020
    Old 03-04-2021 , 05:40   Re: [L4D1 & L4D2] Weapon Prop Give Fix [v1.0.0 | 03-March-2021]
    Reply With Quote #2

    thanks, I am looking for this kind of plugin.
    AXVXA is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 01-25-2022 , 18:48   Re: [L4D1 & L4D2] Weapon Prop Give Fix [v1.0.2 | 25-January-2022]
    Reply With Quote #3

    Plugin updated. (1.0.2)

    Code:
    1.0.2 (25-January-2022)
        - Fixed plugin not working in some situations. (thanks "HarryPotter" for reporting)
    __________________
    Marttt is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 01-26-2022 , 04:45   Re: [L4D1 & L4D2] Weapon Prop Give Fix [v1.0.2 | 25-January-2022]
    Reply With Quote #4

    Quote:
    Originally Posted by Marttt View Post
    Plugin updated. (1.0.2)

    Code:
    1.0.2 (25-January-2022)
        - Fixed plugin not working in some situations. (thanks "HarryPotter" for reporting)

    L4D1 & L4D2 works perfect, thanks
    __________________
    HarryPotter is offline
    metal_upa
    Senior Member
    Join Date: Jun 2016
    Old 12-08-2022 , 08:08   Re: [L4D1 & L4D2] Weapon Prop Give Fix [v1.0.3 | 23-May-2022]
    Reply With Quote #5

    Thanks for the plugin, finally found a fix.

    I made a bit change, i do this for optimization but i too not sure if it optimize or not
    Spoiler
    metal_upa 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 18:01.


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