AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Ammo Manager (clip size, reserved ammo, replenish and realistic reload) (https://forums.alliedmods.net/showthread.php?t=233167)

Root_ 01-10-2014 17:39

[ANY] Ammo Manager (clip size, reserved ammo, replenish and realistic reload)
 
Description:
This plugin allows setup default max ammo values for every weapon.
Modifying maximum clip sizes for weapons is also allowed, but it can be buggy (due to engine restrictions).
This plugin also allows to refill weapon clip and/or restock ammo on kill as well as use 'realistic' reload in any game that SourceMod supports.

Configuration:
It's quite easy to configure this plugin. At first you need to open configs/ammo_manager.txt file. Please read some notes before configuring.
Code:

Notes:
In CS:S/CS:GO its recommended to setup grenade limits via ammo_grenade_limit_* convars, because plugin gives X amount of grenades on any equip.
How to setup ammunition for weapons:
1) Add weapon classname without 'weapon_' prefix (a 'tf_weapon_' in TF2) at a new line.
2) Then add a default clip size for a weapon. It's recommended that you put proper value.
3) After that add desired clip size for this weapon. You can set size to 0 if you dont know default value.
4) Add desired reserved ammo for this weapon. Set to 0 to use defaults (will be actual 0 in CS:S and CS:GO due to ammo_* convars override).
Example: ak47;30;60;120 will set 60 bullets in a clip and 120 reserved for ak47. Symbol ; is case sensitive in configuring!

Then you can setup plugin ConVars:
  • sm_ammo_enabled <0/1> - Whether or not enable Ammo Manager plugin. (Default: enabled)
  • sm_ammo_setclip <0/1> - Whether or not set weapon clip sizes. (Experimental, disabled by default)
  • sm_ammo_reserve <0/1> - Whether or not set reserved ammo settings. (Default: enabled)
  • sm_ammo_realism <0/1> - Whether or not enable realistic reload mode. (Default: disabled)
  • sm_ammo_refill <0/1> - Whether or not refill weapon clip on kill. (Default: disabled)
  • sm_ammo_restock <0/1> - Whether or not restock weapon ammo on kill. (Default: disabled)
  • sm_ammo_ffa <0/1> - Whether or not use ffa mode for ammo replen. (Default: disabled)
Plugin will also generate config (cfg/sourcemod/plugin.ammo_manager.cfg)

I've tested this plugin on DoD:S and CS:GO servers and it seems to be working fine. Report any bugs you found. :crab:

Servers with this plugin

Download plugin
Browse source code

muhannad_x 01-12-2014 17:24

Re: [ANY] Ammo Manager (default clip, max ammo and realistic reload)
 
nice plugin from a kind man
thank you so much

Root_ 01-15-2014 10:29

Re: [ANY] Ammo Manager (clip size, reserved ammo and realistic reload)
 
Update has been released:
  • Added support for m4a1 and usp in CS:GO.
  • Added support for TF2 weapons.
  • Improved option to set default clips for weapons, but its still a bit buggy due to engine restrictions.
  • Optimized plugin.

Newbie1992 01-17-2014 14:17

Re: [ANY] Ammo Manager (clip size, reserved ammo and realistic reload)
 
Nice plugin, i'll check it out in tf2 thanks!

Can you add a admin_flag only cvar?

Root_ 01-17-2014 15:11

Re: [ANY] Ammo Manager (clip size, reserved ammo and realistic reload)
 
No, I see no point of adding this.

erroler 01-19-2014 15:08

Re: [ANY] Ammo Manager (clip size, reserved ammo and realistic reload)
 
Does not work.

L 01/19/2014 - 20:09:45: [SM] Displaying call stack trace for plugin "disabled/ammo_manager.smx":
L 01/19/2014 - 20:09:45: [SM] [0] Line 582, C:\ammo_manager.sp::GetSendPropOffset()
L 01/19/2014 - 20:09:45: [SM] [1] Line 144, C:\ammo_manager.sp::OnPluginStart()

Root_ 01-19-2014 15:26

Re: [ANY] Ammo Manager (clip size, reserved ammo and realistic reload)
 
erroler, you havent posted actual error. Also what game is used?

Root_ 01-19-2014 18:55

Re: [ANY] Ammo Manager (clip size, reserved ammo and realistic reload)
 
I assume it was CS:S and failure on finding "CWeaponCSBaseGun:m_bSilencerOn" send property offset. You can re-download a plugin and try it again, because I dont have CS:S.

Root_ 02-02-2014 09:20

Re: [ANY] Ammo Manager (clip size, reserved ammo and realistic reload)
 
Fixed clip size setting for CS:S and CS:GO, so I have to say that setting clip size is no longer experimental and plugin no longer beta.

B_CANSIN 02-08-2014 17:24

Re: [ANY] Ammo Manager (clip size, reserved ammo and realistic reload)
 
https://forums.alliedmods.net/showthread.php?t=151516 If use ion cannon server will crash It just frozen there is no error in console just frozen it I need close it with task manager. hmm.


All times are GMT -4. The time now is 04:31.

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