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

[L4D2] Improved Prevent M60 Drop


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
MasterMind420
BANNED
Join Date: Nov 2010
Plugin ID:
5323
Plugin Version:
1.7
Plugin Category:
All
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-20-2016 , 11:16   [L4D2] Improved Prevent M60 Drop
    Reply With Quote #1

    Firstly thanks to DeathChaos for allowing me to take over his plugin, secondly thanks to AtomicStryker for his GunControl plugin which i've also learned alot from. Thirdly thanks to Lux for all his coding guidance which has helped me become a better coder.

    Without further delay I give to you [L4D2] Improved Prevent M60 Drop.
    Prevents the m60 from dropping when reaching 0 ammo and allows changing clip and reserve ammo.

    M60 utilizing upgraded ammo packs give wrong ammo count with more than 1 clip.
    Fixed by modifying AtomicStryker's GunControl to only allow 1 clip for m60 only.
    Other weapons will use the clip count set in the config for upgraded ammo clips.

    Code:
    ---VERSION 1.1---
    Complete rewrite thanks to ludastar's suggestions the code is better optimized.
    Changed OnPlayerRunCmd to Event weapon_fire, which seems to work better.
    
    ---VERSION 1.2---
    Rewrote and cleaned up code using new syntax
    Removed dependency on GunControl plugin
    Added upgrade pack ammo fix(1 clip only)
    Added code to allow reloading at ammo piles
    
    ---VERSION 1.3---
    Added ammo reload notification thru chat or hint
    Moved ammo pile reload code to ammo_pile_weapon_cant_use_ammo event(more efficient)
    
    ---VERSION 1.4---
    Converted to new syntax
    Changed reload code back to player use, can reload from any weapon(thanks ngBuckWangs)
    
    ---VERSION 1.5---
    Properly converted to new syntax
    Corrected a mistake which caused ammo locking to effect other weapons
    
    ---VERSION 1.6---
    Ammo issues should be fixed.
    
    ---VERSION 1.7---
    Removed redundant code.
    Reworked ammo pile code to work more naturally.
    Fixed bug when reloading at ammo piles current clip would flow into reserve ammo (Shao).
    -MY PLUGINS-
    Auto Thirdperson Melee v1.6 - https://forums.alliedmods.net/showthread.php?t=282543
    Pistol Reloading v1.0 - https://forums.alliedmods.net/showthread.php?t=286695

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



    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 07:44.


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