This is my first plugin, I did it because I needed that for my 12-survivor server, but I think anyone can benefit from this and help me improving this plugin.
All weapons and health items will have their max times they can be used by multiple players override by the desired amount, if the amount is set to 0 the weapon/item will be deleted from map
Usually, on servers with 5+ survivors the weapons in the saferoom or in the spawnzone are not enough for everybody, usually some players end without weapons, or forced to grab a weapon that they dont like because they have no other option. Also there are some servers with 1 weapon per spot, so the first grabs the weapon is the only who gets it, this plugin fits both situations. With this plugin there can be weapons and health items for everyone. Also weapon number can be decreased or removed to make game harder.
This plugin don`t spawn any entity, only modifies pre-existing entities when the map starts, any weapon or health item spawned by another plugin after the beggining of the round will not be afected by this plugin, even a deleted weapon can be spawned by another plugin. Medkits swpaned around the map assigned by director are not affected, they will spawn random and with only 1 use, for now.
Thanks to asherkin
, for basic guidance, and thanks to Shadowysn
for helping rewriting the code with new syntax.
// Enable or disable plugin. Min: 0 Max: 1
// Amount of primary weapons per spot Min: 0 Max: 32
// Amount of pistols per spot. Min: 0 Max: 32
// Amount of first aid kits per spot. Min: 0 Max: 20
// Amount of pain pills per spot. Min: 0 Max: 20
// Amount of pipe bombs per spot. Min: 0 Max: 20
// Amount of molotovs per spot. Min: 0 Max: 20
// Next ConVars are Left 4 Dead 2 only //
//Amount of magnum pistols per spot. Min: 0 Max: 32
// Amount of vomit jars per spot. Min: 0 Max: 20
// Amount of adrenaline shots per spot. Min: 0 Max: 20
// Amount of defibrillators per spot. Min: 0 Max: 20
// Amount of melee weapons per spot. Min: 0 Max: 20
// Amount of M60 rifles per spot. Min: 0 Max: 20
// Amount of grenade launchers per spot. Min: 0 Max: 20
// Amount of incendiary ammo packs per spot. Min: 0 Max: 20
// Amount of explosive ammo packs per spot. Min: 0 Max: 20
-Fixed plugin version CVar "l4d_wam_version"
- Rebuilded code with new syntax, special thanks to Shadowysn
for help and tips.
- Pistols and magnum pistols can have their amount modified separately from all other weapons.
- Throwables can be managed individually by their respective CVar instead of using a common CVar.
- Added M60 and grenade launcher CVars to manage their amount
- Added xplosive and incendiary ammo pack CVar to manage their amount.