AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [L4D/L4D2] Pistol Reloading (https://forums.alliedmods.net/showthread.php?t=286695)

MasterMind420 08-22-2016 17:15

[L4D/L4D2] Pistol Reloading
 
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

kochiurun119 09-03-2016 21:42

Re: [L4D2] Pistol Reloading
 
When pistol effete ammo can't reload and take ammo for reload ammo.

kochiurun119 09-03-2016 21:42

Re: [L4D2] Pistol Reloading
 
Plugin need a show ammo for pistol.

MasterMind420 09-03-2016 21:52

Re: [L4D2] Pistol Reloading
 
Quote:

Originally Posted by kochiurun119 (Post 2450896)
When pistol effete ammo can't reload and take ammo for reload ammo.

dont understand anything u said...

MasterMind420 09-03-2016 21:54

Re: [L4D2] Pistol Reloading
 
Quote:

Originally Posted by kochiurun119 (Post 2450897)
Plugin need a show ammo for pistol.

it actually doesnt need ammo shown but if I feel ambitious at some point ill code something in. but it would only show through chat or some other method. cant be done like normal. but atm im working out bugs

Lux 09-03-2016 22:09

Re: [L4D2] Pistol Reloading
 
Quote:

Originally Posted by MasterMind420 (Post 2450901)
it actually doesnt need ammo shown but if I feel ambitious at some point ill code something in. but it would only show through chat or some other method. cant be done like normal. but atm im working out bugs

You can do it :D you can put sprites on the clients screen like the ammo count for guns :shock:

Spirit_12 09-03-2016 22:44

Re: [L4D2] Pistol Reloading
 
Having ammo count is a necessity for this plugin. Also, to make it more advanced, maybe you can split the ammo amount for single pistol, dual pistols (double ammo) and Magnum.

Other thing I would request would be to reduce the clip somehow. I read the reasons that you gave, but 120 is more than double of what a person would shoot in a game. 120 vs unlimited argument falls short when 120 is almost as unlimited, considering people hardly use secondary.

Arthedains 11-23-2016 20:33

Re: [L4D2] Pistol Reloading
 
Quote:

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.
Congrats to your plugin.
I love your idea and don't mind seeing no ammo shown. Anyway, any chance to see this being ported to l4d1? I tried it myself, and although I'm a noob at coding, I got it running. :D

The only thing that is somewhat bothering me is the fact that the last bullet seems to be stuck in the pistol and it will never fire. No matter how high I set the ammo capacity.
Any suggestions why this might be happening? Or is this happening in L4D2, too? Otherwise it would be perfect.

Thank you.

MasterMind420 11-24-2016 00:41

Re: [L4D2] Pistol Reloading
 
Quote:

Originally Posted by Arthedains (Post 2472229)
Congrats to your plugin.
I love your idea and don't mind seeing no ammo shown. Anyway, any chance to see this being ported to l4d1? I tried it myself, and although I'm a noob at coding, I got it running. :D

The only thing that is somewhat bothering me is the fact that the last bullet seems to be stuck in the pistol and it will never fire. No matter how high I set the ammo capacity.
Any suggestions why this might be happening? Or is this happening in L4D2, too? Otherwise it would be perfect.

Thank you.

Yah eventually I may get around to coding in an ammo display, my first attempt wasn't very fruitful. L4D1 support should be simple enough, although lately I haven't had much time to code at all. I've changed the code to remove the 1 bullet ammo lock. It was implemented specifically for Improved Multiple Equipment plugin as a workaround to weapon switching. I will release my updated version that removes the bullet lock in the next few days when I have time.

MasterMind420 11-24-2016 09:58

Re: [L4D2] Pistol Reloading
 
1 Attachment(s)
Here is a temporary release, I have incorporated pistol reloading into my unreleased plugin Gun Manager which replaces Gun Control and adds a few new features...I will be releasing it when I have the time to polish the code and test it more. If there are any issues let me know.

VERSION 1.1
Added L4d1 Support(Untested).
Added cvar to change pistol ammo reserve(Untested).
There is a cvar in the config to enable/disable the ammo locking at 1(Compatibility for Improved Multiple Equipment).
Other modifications made...


All times are GMT -4. The time now is 04:44.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.