View Single Post
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 12-14-2011 , 09:30   Re: [CS:S] Ammo Pickup
Reply With Quote #6

@Peace-Maker - I know, I didn't use that weapon ammo stock in this, but I'm going to include the much more simpler version of the ammo pickup plugin that does use that stock. This one was requested to have the ammo boxes drop so I did it a different way.

As to the limits and using the GiveAmmo (thanks btw), I'll mess around with that and check it out. I could put a CVar in so server admins can determine if they want to limit the extra rounds players can pick up to the game allowed maximum or not. The visual maximum of "extra ammo" is 999 - it rolls over after that, but doesn't max out - well, it might "max" out, but I picked up something like 1200 rounds for the m4a1 during my testing.

Thank you for the feedback - always appreciated. I might change this plugin to use the CS_GetDroppedWeaponAmmo, but SDKHooks OnWeaponDropPost is still too fast, the dropped weapon stock returns that the weapon isn't dropped... maybe I'll use a timer or other method...

Quote:
Originally Posted by GrO View Post
Will this also block the ammo box pick up, when the max overall ammo amount is met?
Yes Also, if the ammo box has 80 rounds and the player already has 50 rounds, and the max ammo for the weapon they have holds 90 rounds, then they'll pickup 40 of the 80 and the ammo box will remain, but only have 40 rounds left.

Last edited by TnTSCS; 12-14-2011 at 09:32.
TnTSCS is offline