Raised This Month: $202 Target: $400
 50% 

[CS:GO] - ⋯ Ammo management | Set correctly the ammo amout for each weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dr. Api
BANNED
Join Date: Mar 2015
Location: France
Plugin ID:
4655
Plugin Version:
1.3.0
Plugin Category:
Gameplay
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allow you to manage ammo for weapons
    Old 05-31-2015 , 11:34   [CS:GO] - ⋯ Ammo management | Set correctly the ammo amout for each weapons
    Reply With Quote #1

    I - Description

    Everytime I had a Valve update "items_game.txt" was reset.
    So I did this plugin for my community Zombie4ever.eu and Zombie Escape/Riot servers.
    Allow you to manage weapon ammo instead of using "items_game.txt"

    II - Cvars

    drapi_ammo_338mag_max "30" - AWP
    drapi_ammo_357sig_max "52" - HPK2000
    drapi_ammo_357sig_min_max "12" - CZ75
    drapi_ammo_357sig_p250_max "26" - P250
    drapi_ammo_357sig_small_max "24" - USP-S
    drapi_ammo_45acp_max "100" - FIVESEVEN
    drapi_ammo_50AE_max "35" - DEAGLE
    drapi_ammo_556mm_box_max "200" - M249, NEGEV
    drapi_ammo_556mm_max "90" - M4A1, AK47, FAMAS, GALILAR
    drapi_ammo_556mm_small_max "40" - M4A1-S
    drapi_ammo_57mm_max "100" - P90, UMP45, MAC10
    drapi_ammo_762mm_max "90" - SSG08, AUG, SG556, G3SG1, SCAR20
    drapi_ammo_9mm_max "120" - ELITE, TEC9, MP7, MP9, GLOCK, BIZON
    drapi_ammo_buckshot_max "32" - MAG7, NOVA, SAWEDOFF, XM1014

    This are default ammo. Don't put less than this values in your config "/csgo/cfg/sourcemod/drapi/drapi_ammo.cfg".

    III - Bugs

    FIXED - For no reason, if you reach 0 ammo you will get in plus default ammo of weapon.
    So what I did for example, AK47 Weapon ammo = drapi_ammo_556mm_max - default ammo.


    VI - Credits

    SMLIB for some useful functions

    VII - Changelogs

    Quote:
    V1.3.1
    -Fixed ump45, mac10 -> ammo_45acp_max, fiveseven -> ammo_57mm_max, ak47 -> ammo_762mm_max

    V1.3.0
    Use m_iItemDefinitionIndex to simplify.

    V1.2.0
    -Added M4A1.
    -No bug anymore when reach 0. Ammo are set correctly.

    V1.1.2
    -Detect weapons silencer.

    V1.1.1
    -Correct ammo when round start.

    V1.1.0
    -Tried on differents SM version works.
    VIII - Credits

    Anjin to check and tell me the correct cvars.

    IX - Donate

    If you like my work.




    X - Download
    GIT

    Last edited by Dr. Api; 06-29-2016 at 12:41.
    Dr. Api is offline
    Dr. Api
    BANNED
    Join Date: Mar 2015
    Location: France
    Old 06-01-2015 , 06:21   Re: [CSGO] - Ammo management | Zombie Escape / Riot
    Reply With Quote #2

    V1.1.0 Tried on differents SM version works.
    Dr. Api is offline
    shtopor
    Member
    Join Date: Dec 2010
    Old 06-02-2015 , 04:57   Re: [CSGO] - Ammo management | Zombie Escape / Riot
    Reply With Quote #3

    Nice plugin!

    Code:
    #include <autoexec>
    what is it? why without it I can not compile the plugin?

    Last edited by shtopor; 06-02-2015 at 04:59.
    shtopor is offline
    Dr. Api
    BANNED
    Join Date: Mar 2015
    Location: France
    Old 06-02-2015 , 07:46   Re: [CSGO] - Ammo management | Zombie Escape / Riot
    Reply With Quote #4

    Quote:
    Originally Posted by shtopor View Post
    Nice plugin!

    Code:
    #include <autoexec>
    what is it? why without it I can not compile the plugin?
    It's on the zip file. It's include who making the drapi_ammo.cfg dynamically. For example if I change a cvar or rename you will need to delete the drapi_ammo.cfg and reboot your server.
    Dr. Api is offline
    shtopor
    Member
    Join Date: Dec 2010
    Old 06-02-2015 , 09:29   Re: [CSGO] - Ammo management | Zombie Escape / Riot
    Reply With Quote #5

    ok, thx.
    Another question: why, in the plugin installed and configured, the game displays the same number of ammo?
    example:
    in game M4A1-S - 20/40
    in drapi_ammo.cfg: M4A1-S - 80
    shtopor is offline
    Dr. Api
    BANNED
    Join Date: Mar 2015
    Location: France
    Old 06-02-2015 , 10:02   Re: [CSGO] - Ammo management | Zombie Escape / Riot
    Reply With Quote #6

    Quote:
    Originally Posted by shtopor View Post
    ok, thx.
    Another question: why, in the plugin installed and configured, the game displays the same number of ammo?
    example:
    in game M4A1-S - 20/40
    in drapi_ammo.cfg: M4A1-S - 80
    Cause you have to increase this number.
    M4A1-S should put more than 80 cause at base you have 80 ammo on the M4A1-S.
    Dr. Api is offline
    rodpod
    SourceMod Donor
    Join Date: Jan 2005
    Old 06-02-2015 , 14:52   Re: [CSGO] - Ammo management | Zombie Escape / Riot
    Reply With Quote #7

    could you add execution on player spawn to your script??
    rodpod is offline
    Dr. Api
    BANNED
    Join Date: Mar 2015
    Location: France
    Old 06-02-2015 , 14:56   Re: [CSGO] - Ammo management | Zombie Escape / Riot
    Reply With Quote #8

    Quote:
    Originally Posted by rodpod View Post
    could you add execution on player spawn to your script??
    Sorry the function for the round start was here but I forgot to trigger it. Wait a minute I upload that.
    Dr. Api is offline
    rodpod
    SourceMod Donor
    Join Date: Jan 2005
    Old 06-02-2015 , 15:46   Re: [CSGO] - Ammo management | Zombie Escape / Riot
    Reply With Quote #9

    ok. works but not instantly in buyzone. when i bought p250 (changed to 52 ammo) i still saw 26 ammo in reserve. when i switched weapons and went back to secondary it showed 52 bullets. fired 3 rounds, reloaded, 49 bullets in reserve. works like a charm. maybe a little delay (timer 0.2) after purchasing?

    [edit]
    my bad. timer works.

    cheers mate

    Last edited by rodpod; 06-02-2015 at 15:49.
    rodpod is offline
    Dr. Api
    BANNED
    Join Date: Mar 2015
    Location: France
    Old 06-02-2015 , 15:52   Re: [CSGO] - Ammo management | Zombie Escape / Riot
    Reply With Quote #10

    Quote:
    Originally Posted by rodpod View Post
    ok. works but not instantly in buyzone. when i bought p250 (changed to 52 ammo) i still saw 26 ammo in reserve. when i switched weapons and went back to secondary it showed 52 bullets. fired 3 rounds, reloaded, 49 bullets in reserve. works like a charm. maybe a little delay (timer 0.2) after purchasing?

    [edit]
    my bad. timer works.

    cheers mate
    Yes, I put a datatimer to 0.5 but I can put for 0.0 next version.
    Dr. Api 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 03:29.


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