[CS:S] Ammo Pickup

This plugin was a request - read about it here



DESCRIPTION

Whether a player manually drops a weapon, or the weapon is dropped as a result of their death, an ammo box will be dropped alongside the weapon. The weapons extra ammo will be set to 0 and the ammo box will contain what the weapon's extra ammo was.



This plugin can be set to allow or disallow picking up ammo of the same type if the weapon that dropped it was different - example, player1 dropped their MP5 rifle and a box of 9mm ammo was dropped. If player2 has a glock (which is 9mm) and you have mixed ammo set to "allow" then player2 can pick up that 9mm ammo - if, on the other hand, you have mixed ammo set to "disallow" then player2 cannot pick up that ammo even though their glock uses the same ammo type.



There are three models for the ammo boxes (all included with CS:S, so no need to have anything downloaded to your clients). A model for shotgun ammo, a model for pistol ammo, and a model for rifle ammo. There's also a sound file (also included with CS:S, no need for a download) that fires when players pick up the ammo.

Here are the three models:

Pistols: ..........Shotguns: .....Other:





You can also set to only allow players to drop pistol ammo, or only drop rifle ammo, or be able to drop both. Also, you can set if bots drop ammo or not.



You can also set if ammo drops should only occur after mp_freezetime expires or allow ammo drops anytime during the round. I suggest you set this CVar to have the plugin wait for mp_freezetime to expire, otherwise, you'll have a bunch of ammo in the spawn area because everyone is buying new weapons and dropping old ones. Up to you though.



Also, this plugin is Updater capable and a CVar is present (defaulted to off) so you can set whether this plugin gets auto-updated or not (if you have the Updater plugin).





CVars




"sm_ammopickup_botsdrop" = "1" min. 0.000000 max. 1.000000

- Do bots drop ammo? 1=yes, 0=no'



"sm_ammopickup_delaydrops" = "1" min. 0.000000 max. 1.000000

- Delay ammo drops until mp_roundtime has expired? 1=yes, 0=no'



"sm_ammopickup_mixedammo" = "1" min. 0.000000 max. 1.000000

- Allow player to pickup ammo if "ammo type" is the same regardless of if "gun

type" is different (UMP vs glock)? 1=yes, 0=no'



"sm_ammopickup_pistols" = "1" min. 0.000000 max. 1.000000

- Drop ammo on pistol drops? 1=yes, 0=no'



"sm_ammopickup_rifles" = "1" min. 0.000000 max. 1.000000

- Drop ammo on rifle (shotty, awp, auto, rifle) drops? 1=yes, 0=no'



"sm_ammopickup_useupdater" = "1" ( def. "0" ) min. 0.000000 max. 1.000000

- Utilize updater plugin to auto-update Ammo Pickup when updates are published?

1=yes, 0=no'







REQUIREMENTS

SDKHooks



Optional

Updater



CREDITS and THANKS

Bacardi for borrowed code from Healthkit from dead plugin



Folks on IRC for putting up with my questions



GrO for request



TO DO LIST

mmm - suggest something :)



INSTALLATION

Copy the SMX file to your plugins folder. If you want to compile yourself, you'll need SDKHooks include and Updater include files. The web compiler will not compile the .sp, so you'll need to download the attached .smx



SCREENSHOTS









Attached Thumbnails


Click image for larger version<br /> <br /> Name:	2011-12-11_00003.jpg<br /> Views:	N/A<br /> Size:	60.3 KB<br /> ID:	96677
 











Attached Files








File Type: sp


Get Plugin or
Get Source (AmmoPickup.sp - 20.9 KB)


File Type: smx


AmmoPickup.smx (12.4 KB)








Orignal From: [CS:S] Ammo Pickup

No comments

Not a single link is allowed to submit in comment :o