Raised This Month: $ Target: $400
 0% 

View Poll Results: Would you like support for other mods?
TF2 13 20.97%
L4D 7 11.29%
Other - Send PM 8 12.90%
Only play CSS 46 74.19%
Multiple Choice Poll. Voters: 62. You may not vote on this poll

[CS:S/CS:GO] Ammo Replenishment Lite - Refill on kill and Restock when out


Post New Thread Reply   
 
Thread Tools Display Modes
Author
LumiStance
AlliedModders Donor
Join Date: Jan 2009
Location: Northern California
Plugin ID:
2370
Plugin Version:
1.5
Plugin Category:
Gameplay
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
    20 
    Plugin Description:
    Provides automatic ammo refill and restock to Counter Strike: Source and Counter Strike: Global Offensive
    Old 06-05-2011 , 20:37   [CS:S/CS:GO] Ammo Replenishment Lite - Refill on kill and Restock when out
    Reply With Quote #1

    Description
    Provides automatic ammo refill and restock to Counter Strike: Source
    Refill, when enabled, will fill the magazine clip when you get a kill.
    Refill can be limited to headshots only.
    Restock, when enabled, will give a box of ammo when you run out.

    The weapon lookup for refill uses integer instead of string comparison to reduce CPU usage,
    and only when the weapon is first picked up.
    The ammo lookup for restock uses the weapon's ammo type as an array index to get the box size.

    Servers using this mod: GameTracker sm_replenlite_version

    Installation:
    Place compiled plugin (sm_replen.smx) into your plugins folder.
    The configuration file (replen.cfg) is generated automatically.
    Changes to replen.cfg are read at map/plugin load time.
    Changes to cvars made in console take effect immediately.

    Complimentary Plugins:
    Deathmatch Lite Respawn

    Upgrade Notes:
    Added sm_replenlite_headshot as of v1.3; add this to replen.cfg if you wish to use it.

    Problems, Bug Reports, Feature Requests, and Compliments:
    Please send me a private message at http://forums.alliedmods.net/private...=newpm&u=46596
    Include a detailed description of how to reproduce the problem. Information about your server,
    such as dedicate/listen, platform (win32/linux), game, and ip address may be useful.

    I prefer to keep the plugin thread cleared so people don't have to wade through pages of fodder.
    The community will be given a chance to address any bug reports that are posted in the plugin thread.
    If you want a direct response from me, send a private message.

    Compliments are always welcomed in the thread.

    Background:
    I developed this plugin as part of my SM Gun Menu Lite project.

    Files:
    cstrike/addons/sourcemod/plugins/sm_replen.smx
    cstrike/cfg/sourcemod/replen.cfg

    Configuration Variables (Change in replen.cfg):
    • sm_replenlite_refill - Enable/Disable Clip Refill. (Default: "1")
    • sm_replenlite_headshot - Enable/Disable Clip Refill only on headshot. (Default: "0")
    • sm_replenlite_restock - Enable/Disable Ammo Restock. (Default: "1")

    Changelog:
    Code:
    1.5 <-> 2012 - 11/25 LumiStance
    Added guns for CS:GO
    Bulk of CacheClipSize() now from code generator
    1.4 <-> 2011 - 06/29 LumiStance (946 downloads)
    Remove code to log unknown ammo_type
    1.3 <-> 2011 - 06/28 LumiStance (2 downloads)
    Add code to allow refills only on headshot
    Improved refill to prevent unneeded reload
    1.2 <-> 2011 - 06/28 LumiStance (2 downloads)
    Refactored code to SetFailState if FindSendPropOffs fails
    Improved client_index validation in Event_HandleReserveAmmo() and Event_HandleAutoReload
    Add code to log unknown ammo_type for player name and weapon
    Add code to validate ammo_type
    1.1 <-> 2011 - 06/05 LumiStance (83 downloads)
    Add code to automatically create configuration file
    1.0 <-> 2011 - 06/04 LumiStance (8 downloads)
    Initial released
    Development Files (not for server):
    _gunids.pl - Generates code for CacheClipSize()
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_replen.sp - 8567 views - 11.8 KB)
    File Type: 7z _gunids.7z (1.3 KB, 3256 views)
    __________________

    Last edited by LumiStance; 11-25-2012 at 23:17. Reason: Add CS:GO guns
    LumiStance is offline
    fifipaldi
    Member
    Join Date: Apr 2011
    Old 06-06-2011 , 16:48   Re: [CSS] Ammo Replenishment Lite - Refill on kill and Restock when out
    Reply With Quote #2

    Another needed plugin by you. Good job. I was looking for this for a long time . Works fine on my DM servers. Can you do it to refill only after headshot ? Just an idea.

    Last edited by fifipaldi; 06-07-2011 at 09:09.
    fifipaldi is offline
    nikedu45
    Senior Member
    Join Date: May 2011
    Old 06-15-2011 , 13:19   Re: [CSS] Ammo Replenishment Lite - Refill on kill and Restock when out
    Reply With Quote #3

    Hello, I have this error message which is sent without stopping in the error logs sourcemod.

    L 06/15/2011 - 6:57:04 p.m.: [SM] [0] Line 256, C: \ Users \ root \ Desktop \ sm \ addons \ sourcemod \ scripting \ sm_replen.sp: Event_HandleReserveAmmo ()


    The bug has been fixed with the new version.
    __________________
    Bl4ck-And-White.fr
    I'm French !!

    Last edited by nikedu45; 07-05-2011 at 06:12. Reason: Update
    nikedu45 is offline
    shotzonfire
    New Member
    Join Date: May 2011
    Location: Australia
    Old 06-28-2011 , 03:20   Re: [CSS] Ammo Replenishment Lite - Refill on kill and Restock when out
    Reply With Quote #4

    same error here nikedu45
    shotzonfire is offline
    LumiStance
    AlliedModders Donor
    Join Date: Jan 2009
    Location: Northern California
    Old 06-28-2011 , 23:15   Re: [CSS] Ammo Replenishment Lite - Refill on kill and Restock when out
    Reply With Quote #5

    Updated to v1.2
    Improvements:
    Refactored code to SetFailState if FindSendPropOffs fails
    Improved client_index validation in Event_HandleReserveAmmo() and Event_HandleAutoReload
    Add code to log unknown ammo_type for player name and weapon
    Add code to validate ammo_type
    __________________
    LumiStance is offline
    LumiStance
    AlliedModders Donor
    Join Date: Jan 2009
    Location: Northern California
    Old 06-29-2011 , 01:54   Re: [CSS] Ammo Replenishment Lite - Refill on kill and Restock when out
    Reply With Quote #6

    Updated to v1.3
    Improvements:
    Add code to allow refills only on headshot
    Improved refill to prevent unneeded reload
    __________________
    LumiStance is offline
    LumiStance
    AlliedModders Donor
    Join Date: Jan 2009
    Location: Northern California
    Old 06-29-2011 , 05:36   Re: [CSS] Ammo Replenishment Lite - Refill on kill and Restock when out
    Reply With Quote #7

    Updated to v1.4
    Improvements:
    Remove code to log unknown ammo_type

    Log spam was caused by weapon switch to non firearm (such as knife or grenade).
    __________________
    LumiStance is offline
    fifipaldi
    Member
    Join Date: Apr 2011
    Old 06-30-2011 , 05:44   Re: [CSS] Ammo Replenishment Lite - Refill on kill and Restock when out
    Reply With Quote #8

    Nice ;)
    fifipaldi is offline
    boen747
    New Member
    Join Date: May 2012
    Old 05-23-2012 , 09:18   Re: [CSS] Ammo Replenishment Lite - Refill on kill and Restock when out
    Reply With Quote #9

    Any chance sombody could edit this awsome script so that i can use it for my gg server ?

    say !give = ammo clip replenish
    reload weapon = clip replenish

    is there anybody that would kindley do this for me and send to [email protected] or repost it here ?

    i had ago at editing it myself but failed hard cuz im not very good with this kinda stuff.
    boen747 is offline
    LumiStance
    AlliedModders Donor
    Join Date: Jan 2009
    Location: Northern California
    Old 05-23-2012 , 20:21   Re: [CSS] Ammo Replenishment Lite - Refill on kill and Restock when out
    Reply With Quote #10

    Quote:
    Originally Posted by boen747 View Post
    Any chance sombody could edit this awsome script so that i can use it for my gg server ?

    say !give = ammo clip replenish
    reload weapon = clip replenish

    is there anybody that would kindley do this for me and send to [email protected] or repost it here ?

    i had ago at editing it myself but failed hard cuz im not very good with this kinda stuff.
    What is the point of adding a command when the plugin replenishes automatically?

    Have you looked at the gungame config? Specifically:
    /* Auto reload current level weapon on kill */
    "ReloadWeapon" "1"


    And if you are really that bad of a shot and run out all of your clips before leveling up, there is knife pro:
    /* Turn Knife Pro allow stealing a player level by killing them with a knife */
    "KnifePro" "1"
    __________________
    LumiStance 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 18:07.


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