Description
This plugin make it so that other survivor can't pick up dropped weapon unless that weapon is not owned (already picked up once).
Features
Allow configuring locking primary and secondary weapon separately.
Allow weapon ownership timeout after a while.
By default, player have to opt-in to use this weapon lock function by running "sm_wp_toggle_lock" once.
Cvars
A configuration file named "l4d2_weaponowner.cfg" will automatically be created for you upon the first run in the "\cfg\sourcemod\" folder.
PHP Code:
// 1=lock Primary weapon On. 0=ignore Primary weapon
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
weapon_owner_lock_primary_on "1"
// 1=lock Secondary weapon On. 0=ignore Secondary weapon
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
weapon_owner_lock_secondary_on "1"
// 1=enable Weapon Ownership timeout. 0=disable Weapon Ownership timeout
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
weapon_owner_lock_timeout "0"
// Duration for weapon claim.
// -
// Default: "30"
// Minimum: "5.000000"
// Maximum: "9999.000000"
weapon_owner_lock_timeout_duration "30"
// Enable plugin. 1=Plugin On. 0=Plugin Off
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
weapon_owner_on "1"
Client Commands
Code:
- "sm_wp_toggle_lock" Toggle for whether the client want to lock their dropped weapon or not.
- "sm_wp_unlock" Unlock all of client's currently locked weapon.
- "sm_wp_unlock_primary" Unlock client's currently claimed primary weapon.
- "sm_wp_unlock_secondary" Unlock client's currently claimed secondary weapon.
Changelog
Code:
v1.0.0 06-Nov-2021
- Initial release