View Single Post
Author Message
MasterMind420
BANNED
Join Date: Nov 2010
Old 08-22-2016 , 17:15   [L4D/L4D2] Pistol Reloading
Reply With Quote #1

Firstly I would like to thank Ludastar for his coding expertise, DeathChaos25 for his original Prevent M60 Drop plugin and AtomicStryker for his GunControl plugin. I'm a decent coder but without ludastar's help with optimizations and DeathChaos's and AtomicStryker's plugins this wouldn't have been easy to do.

I've always hated unlimited pistol ammo, it made me feel like a cheater, plus what the heck it's more realistic. So without further delay I give to you Pistol Reloading.

What this plugin does is forces limited pistol ammo to 120(no need to set a cvar in server config this will override it). Reason being that ammo_pistol_max is now tied into both pistol and magnum(magnum used to have its own cvar but they combined it). Also any amounts above 120 become inaccurate and below aren't divisible evenly, clip wise. So I am forcing it to 120 because both pistol/magum clips are divisible into it. You get 8 pistol clips per pistol and 15 magnum clips. When initially having a gun or picking one up you have an extra clip, once reloaded at ammo piles it goes to normal(120 ammo).

As for bots because I realize there would be an issue, I resolved this by replenishing there ammo when they reach 0(infinite bot ammo for pistols/magnums).

Human player ammo will stop at 1 once all reserve ammo is used, that way its compatible with Multiple Equipment.

AS ALWAYS PLEASE INFORM ME OF ANY ISSUES AND I'LL RESOLVE THEM AS SOON AS POSSIBLE

---VERSION 1.3---
Converted to new syntax

---VERSION 1.4 Beta---
Added pistol ammo display using instructor hints. (Instructor Hints must be enabled on clients to see it)
Added customizable pistol and magnum clips(work in progress, probably buggy)(if so then leave at default in cfg)
Reworked ammo handling code to take into account individual pistols.
Misc code revisions and fixes.
Please report any bugs.

-MY PLUGINS-
Auto Thirdperson Melee v1.6 - https://forums.alliedmods.net/showthread.php?t=282543
Improved Prevent M60 Drop v1.1 - https://forums.alliedmods.net/showthread.php?p=2446651

Last edited by DarkDeviL; 10-18-2021 at 09:04. Reason: Restore to previous version.
MasterMind420 is offline