Raised This Month: $12 Target: $400
 3% 

[L4D/L4D2] Pistol Reloading


Post New Thread Reply   
 
Thread Tools Display Modes
Author
MasterMind420
BANNED
Join Date: Nov 2010
Plugin ID:
5324
Plugin Version:
1.0
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Delete This Thread
    Unapprover:
    Reason for Unapproving:
    No source code / plugin, upload source and use the Report Post button for a new review.
    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
    kochiurun119
    BANNED
    Join Date: Sep 2014
    Location: GB
    Old 09-03-2016 , 21:42   Re: [L4D2] Pistol Reloading
    Reply With Quote #2

    When pistol effete ammo can't reload and take ammo for reload ammo.
    kochiurun119 is offline
    Send a message via ICQ to kochiurun119 Send a message via AIM to kochiurun119 Send a message via Yahoo to kochiurun119 Send a message via Skype™ to kochiurun119
    kochiurun119
    BANNED
    Join Date: Sep 2014
    Location: GB
    Old 09-03-2016 , 21:42   Re: [L4D2] Pistol Reloading
    Reply With Quote #3

    Plugin need a show ammo for pistol.
    kochiurun119 is offline
    Send a message via ICQ to kochiurun119 Send a message via AIM to kochiurun119 Send a message via Yahoo to kochiurun119 Send a message via Skype™ to kochiurun119
    MasterMind420
    BANNED
    Join Date: Nov 2010
    Old 09-03-2016 , 21:52   Re: [L4D2] Pistol Reloading
    Reply With Quote #4

    Quote:
    Originally Posted by kochiurun119 View Post
    When pistol effete ammo can't reload and take ammo for reload ammo.
    dont understand anything u said...
    MasterMind420 is offline
    MasterMind420
    BANNED
    Join Date: Nov 2010
    Old 09-03-2016 , 21:54   Re: [L4D2] Pistol Reloading
    Reply With Quote #5

    Quote:
    Originally Posted by kochiurun119 View Post
    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
    MasterMind420 is offline
    Lux
    Veteran Member
    Join Date: Jan 2015
    Location: Cat
    Old 09-03-2016 , 22:09   Re: [L4D2] Pistol Reloading
    Reply With Quote #6

    Quote:
    Originally Posted by MasterMind420 View Post
    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 you can put sprites on the clients screen like the ammo count for guns
    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D
    Lux is offline
    Spirit_12
    Veteran Member
    Join Date: Dec 2012
    Location: Toronto, CA
    Old 09-03-2016 , 22:44   Re: [L4D2] Pistol Reloading
    Reply With Quote #7

    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.
    __________________
    Spirit_12 is offline
    Arthedains
    Junior Member
    Join Date: Nov 2016
    Location: Europe
    Old 11-23-2016 , 20:33   Re: [L4D2] Pistol Reloading
    Reply With Quote #8

    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.

    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.

    Last edited by Arthedains; 11-23-2016 at 21:15. Reason: text formatting
    Arthedains is offline
    MasterMind420
    BANNED
    Join Date: Nov 2010
    Old 11-24-2016 , 00:41   Re: [L4D2] Pistol Reloading
    Reply With Quote #9

    Quote:
    Originally Posted by Arthedains View Post
    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.

    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 is offline
    MasterMind420
    BANNED
    Join Date: Nov 2010
    Old 11-24-2016 , 09:58   Re: [L4D2] Pistol Reloading
    Reply With Quote #10

    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...
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_pistol_reloading.sp - 1343 views - 10.2 KB)

    Last edited by MasterMind420; 11-26-2016 at 09:41.
    MasterMind420 is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 17:23.


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