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

[CS:S] Ammo From Dead


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Plugin ID:
2705
Plugin Version:
0.2.1.8
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    1 
    Plugin Description:
    When players die, they drop the ammo from their weapons on the ground
    Old 12-13-2011 , 23:40   [CS:S] Ammo From Dead
    Reply With Quote #1

    This plugin changed scope on 12/31/11 - it is now Ammo From Dead instead of Ammo Pickup

    This plugin was a request - read about it here

    DESCRIPTION
    When a weapon is dropped as a result of a player's death, an ammo box will be dropped alongside the weapon. The weapon entity's extra ammo will be set to 0 and the ammo box will contain what the extra ammo was. If the weapon had 15 in the clip with 75 reserve, the ammo box will have 75 rounds.

    It will also record the weapon type (Rifle, Pistol, or Shotgun) and the ammo type. There are CVars (see below) where you can deem if a player can fill their ammo even if the ammo type is different. You can also set this plugin to abide by weapon ammo max so that players cannot pick up more than the default ammo max allowed.

    Explanation of allowing or disallowing picking up ammo of the same type if the weapon that dropped it was different - player1 dropped their MP5 rifle and a box of 9mm ammo was dropped from that weapon. If player2 has a glock (which is 9mm) and you have mixed ammo set to "allow" then player2 can pick up that 9mm ammo - if, on the other hand, you have mixed ammo set to "disallow" then player2 cannot pick up that ammo even though their glock uses the same ammo type.

    There are three models for the ammo boxes (all included with CS:S, so no need to have anything downloaded to your clients). A model for shotgun ammo, a model for pistol ammo, and a model for rifle ammo. There's also two sound files (also included with CS:S, no need for a download) that fires when players pick up the ammo (you define which one you want to use).
    Here are the three models:
    [img]http://img402.**************/img402/984/ammofromdead.png[/img]

    You can also set to only allow players to drop pistol ammo, or only drop rifle ammo, or be able to drop both. Also, you can set if bots drop ammo or not.

    Also, this plugin is Updater capable and a CVar is present (defaulted to off) so you can set whether this plugin gets auto-updated or not (if you have the Updater plugin).

    CVars


    REQUIREMENTS
    SourceMod 1.4.4+
    SDKHooks

    Optional
    Updater

    CREDITS and THANKS
    Bacardi for borrowed code from Healthkit from dead plugin

    GrO for the tremendous help in testing and suggesting tweaks. GrO was the initial requester and helped out a lot.

    Folks on IRC for putting up with my questions

    CHANGE LOG

    TO DO LIST
    mmm - suggest something :)

    INSTALLATION
    Copy the SMX file to your plugins folder. If you want to compile yourself, you'll need SDKHooks include and Updater include files. The web compiler will not compile the .sp, so you'll need to download the attached .smx.

    Also, you need to put the giveammo.txt in your gamedata folder.

    A config file will be created when you first launch this plugin - it will be in your cfg\sourcemod folder named plugin.ammo_from_dead.cfg

    UPGRADING?
    If upgrading to a new version that has new CVars, it's best to backup your old config file and delete it, then let the plugin create a new one for you, then edit that newly created one. This way, you get all of the available configs so you can set the way you want.

    SCREENSHOTS
    Attached Thumbnails
    Click image for larger version

Name:	ammofromdead.jpg
Views:	1769
Size:	31.6 KB
ID:	97595  
    Attached Files
    File Type: txt giveammo.txt (141 Bytes, 1193 views)
    File Type: smx ammo_from_dead.smx (16.9 KB, 1099 views)
    File Type: sp Get Plugin or Get Source (ammo_from_dead.sp - 1100 views - 35.4 KB)
    __________________
    View my Plugins | Donate

    Last edited by TnTSCS; 04-22-2013 at 00:29. Reason: Removed left over debug code
    TnTSCS 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 06:41.


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