Made possible with
Psykotikism's Library of L4Ds Signatures!
Description
Individually control weapon reserve independent of "
ammo_*" cvars. Primary intent is to let weapon modders set reserve ammo counts without fighting with ammo types
(CSS Snipers, L4D1 Shotguns)
Customization
Go to the "
/addons/sourcemod/data/l4d_reservecontrol.cfg" file after the plugin has been installed, and edit it.
Data File
PHP Code:
"ReserveControl"
{
// Following weapons can have edited reserves, even with edited ammo types.
/// (except AMMO_TYPE_PISTOL or AMMO_TYPE_PISTOL_MAGNUM, since their ammo is infinite)
// ++ L4D1 Weapons ++
// ------------------
//// Standard
// "weapon_pistol" 999
"weapon_smg" 500
"weapon_pumpshotgun" 72
"weapon_rifle" 360
"weapon_autoshotgun" 90
"weapon_hunting_rifle" 150
// ++ L4D2 Weapons ++
// ------------------
//// Standard
"weapon_smg_silenced" 500
"weapon_shotgun_chrome" 72
"weapon_rifle_desert" 360
"weapon_rifle_ak47" 200
"weapon_shotgun_spas" 90
"weapon_sniper_military" 150
//// CS:S Weapons
"weapon_smg_mp5" 500
"weapon_rifle_sg552" 360
"weapon_sniper_scout" 120
"weapon_sniper_awp" 120
//// Special Tier
// "weapon_grenade_launcher" 30
// "weapon_pistol_magnum" 999
// "weapon_rifle_m60" 0
}
Commands
Spoiler
PHP Code:
// Resets the reserve ammo data, then reload the config.
sm_rc_reload
// Alias of 'sm_rc_reload'
sm_reversecontrol_reload
Changelog
Requirements- DHooks (Dynamic Detours) extension.
WARNING- Weapons via the give command won't spawn with the correct reserve counts till an ammo pile is used. Not sure why this happens, but its really minor practically.
- If other plugins that edit reserve ammo are also present, their functionalities may conflict and fight with this plugin!
- Unfortunately preventing this is simply not possible, every plugin is vastly different from each other in implementation.
Installing
Extract the .zip file's folders into
/addons/sourcemod.