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
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.