This will delete the ammo pile entity once each survivor has used it at least once. The last person that uses it will receive a message stating the ammo pile has been depleted.
This should work with l4d1, but I only tested with l4d2.
Todo
- Block someone from using the pile after they've used it once (or after they've taken X ammo)
CVARS
l4d_limited_ammo_pile_ver - Version of the plugin
l4d_limited_ammo_pile_on - If the Limited Ammo Piles plugin is on or off
History
1.2
- Added a check to see if entity was valid edict when the use event fired.
1.1
- Stops processing ammo pile data if the map is in the finale. (Checks for the presence of the trigger_finale entity on the map)
1.02:
- Fixed usage of on\off. Variable existed, but wasn't used